javascript – Expected 0 arguments, but got 1 in typescript

//open active panel (and close unactive panels)
const setActivePanel = activePanelNum => {

//remove active class from all the panels
removeClasses(DOMstrings.stepFormPanels, 'js-active');

//show active panel
DOMstrings.stepFormPanels.forEach((elem, index) => {
  if(index === (activePanelNum)) {
    
    elem.classList.add('js-active');
 
    setFormHeight(elem);
    
  }
})

};

If i remove “elem” parameter from setFormHeight(); the code will executed but output has came other than expected.

Please try to help to solve this error.

Thank you in advance.