title: How to add a while(1) loop in nodeJS
body: <p>In NODEJS I want a function that will keep executing after every 5 seconds, and I used while(1) loop with a time out of 5 seconds. But its not working.</p>
  
  <pre><code>    while(1){
  
              var ms=4000;
              ms += new Date().getTime();
              while (new Date() &lt; ms){}
  
              execute(12345,0);
  
      }
  </code></pre>