Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var i = 1; // set your counter to 1
- function myLoop () { // create a loop function
- setTimeout(function () { // call a 30 millisecond setTimeout when the loop is called
- window.open(); // your code here
- i++; // increment the counter
- if (i < 1000000000) { // if the counter < 1000000000, call the loop function
- myLoop(); // .. again which will trigger another
- } // .. setTimeout()
- }, 30)
- }
- myLoop();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement