Simple way to make a Timer in JS


/ Published in: JavaScript
Save to your folder(s)

dont use setInterval!!!


Copy this code and paste it in your HTML
  1. (function loopFunction(){
  2.  
  3. doSomething();
  4.  
  5. setTimeout(loopFunction, 100);
  6. })();

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.