function changeTab() {
  let lastSelected = document.querySelector('.selected-tab');
  let lastTab = document.querySelector('.active-tab');
  lastSelected.className =
      lastSelected.className.replace('selected-tab', 'hidden-tab');
  lastTab.className = lastTab.className.replace('active-tab', 'inactive-tab');

  setSelectedTab();
}
/**
 * Change the previously selected element to 'hidden-tab' class, and switch the
 * selected element to 'selected-tab' class.
 */
Change the previously selected element to 'hidden-tab' class, and switch the
selected element to 'selected-tab' class.
Change the previously selected element to ' hidden - tab ' class and switch the selected element to ' selected - tab ' class .
function changeTab() {
  let lastSelected = document.querySelector('.selected-tab');
  let lastTab = document.querySelector('.active-tab');
  lastSelected.className =
      lastSelected.className.replace('selected-tab', 'hidden-tab');
  lastTab.className = lastTab.className.replace('active-tab', 'inactive-tab');
  setSelectedTab();
}
function changeTab ( ) { let lastSelected = document . querySelector ( '.selected-tab' ) ; let lastTab = document . querySelector ( '.active-tab' ) ; lastSelected . className = lastSelected . className . replace ( 'selected-tab' , 'hidden-tab' ) ; lastTab . className = lastTab . className . replace ( 'active-tab' , 'inactive-tab' ) ; setSelectedTab ( ) ; }
Change the previously selected element to 'hidden-tab' class, and switch the
 selected element to 'selected-tab' class.
Change the previously selected element to ' hidden - tab ' class and switch the selected element to ' selected - tab ' class .