title: JavaScript setTimeout() won't wait to Execute?
body: <p>Consider the following example:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function alertBox(){
          alert('Hello World!');
      }
      function doSomething(){
          setInterval(alertBox(), 5000); //This is for generic purposes only
      };
      function myFunction(){
          setTimeout(doSomething(),3000);
      };
  
      myFunction();
  &lt;/script&gt;
  </code></pre>
  
  <p>What is it that causes this to execute <strong><em>IMMEDIATELY</em></strong>, rather than waiting the 3 seconds set, as well as only executing the alert <strong><em>ONCE</em></strong>, rather than at the scheduled 5 second intervals?</p>
  
  <p>Thanks for any help you can provide!</p>
  
  <p>Mason</p>