function changetheme() {
  switchButton.addEventListener("click", function () {
    if (theme.getAttribute("href") === "styles/light-theme.css") {
      theme.href = "styles/dark-theme.css";
    } else {
      theme.href = "styles/light-theme.css";
    }
  });
}
// function that switches css file when user use toggle button
function that switches css file when user use toggle button
function that switches css file when user use toggle button
function changetheme() {
  switchButton.addEventListener("click", function () {
    if (theme.getAttribute("href") === "styles/light-theme.css") {
      theme.href = "styles/dark-theme.css";
    } else {
      theme.href = "styles/light-theme.css";
    }
  });
}
function changetheme ( ) { switchButton . addEventListener ( "click" , function ( ) { if ( theme . getAttribute ( "href" ) === "styles/light-theme.css" ) { theme . href = "styles/dark-theme.css" ; } else { theme . href = "styles/light-theme.css" ; } } ) ; }
function that switches css file when user use toggle button
function that switches css file when user use toggle button