title: Can't get setTimeout in javascript to work properly
body: <p>I have a function in javascript:  </p>
  
  <pre><code>function test(){
  ...
      if (){
          setTimeout(test(), 1000);
      }
  }
  </code></pre>
  
  <p>according to the manual, i can call this with:</p>
  
  <pre><code>setTimeout(test(), 1000);
  </code></pre>
  
  <p>in fact, it calls, but do not wait the 1s. so I try to use it like the following and it works. </p>
  
  <pre><code>setTimeout(function(){test();}, 1000);  
  </code></pre>
  
  <p>Anyone can explain this to me?</p>