1var i = 1; // set your counter to 1
2
3function myLoop() { // create a loop function
4 setTimeout(function() { // call a 3s setTimeout when the loop is called
5 console.log('hello'); // your code here
6 i++; // increment the counter
7 if (i < 10) { // if the counter < 10, call the loop function
8 myLoop(); // .. again which will trigger another
9 } // .. setTimeout()
10 }, 3000)
11}
12
13myLoop(); // start the loop