title: My nested functions aren't working correctly
body: <p>I've never used nested functions before, and this seemingly simple task is giving me trouble. When I run this code, only the first function works, and the second is completely unresponsive (but doesn't give me an error message). What am I doing wrong?</p>
  <pre><code>function toggleMobileMenu() {
      setTimeout(function showMobileMenu() {
          var x = document.getElementById(&quot;content&quot;);
          if (x.style.display === &quot;none&quot;) {
              x.style.display = &quot;block&quot;;
          } else {
              x.style.display = &quot;none&quot;;
          }
      }, 1000);
      function toggleClasses() {
          var element = document.getElementById(&quot;myNav&quot;);
          element.classList.toggle(&quot;fixed&quot;);
          var element = document.getElementById(&quot;overlay&quot;);
          element.classList.toggle(&quot;fixed&quot;);
          var element = document.getElementById(&quot;site-header&quot;);
          element.classList.toggle(&quot;fixed&quot;);
      }
  }
  </code></pre>