Guest User

Untitled

a guest
Oct 15th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. for (var i = 0; i < 10; i++) {
  2. process.nextTick(function () { console.log(i); });
  3. }
  4.  
  5. // Prints 10 x 10 times
  6. // I want it to print 1 - 10 without using an external array to store i
Add Comment
Please, Sign In to add comment