Answers for "node js while loop with settimeout"

0

node js while loop with settimeout

var myFunc01 = function() {
  var i = 0;
  while (i < 100) {
    (function(i) {
      setTimeout(function() {
        console.log("hello")
      }, 1000 * i)
    })(i++)
  }
};

myFunc01();
Posted by: Guest on October-18-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language