Last active
September 17, 2016 07:04
-
-
Save g-patel/2c03fd3aae23d572fdac51f164dc4d79 to your computer and use it in GitHub Desktop.
If you can tell output of following program, you probably know javascript event loop. Ref: https://mzl.la/1T3wZ3U
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
for(let i=0; i<1000 ;i++) { | |
setTimeout(function() { | |
console.log(`Hi`); | |
}, 0); | |
} | |
for(let i=0; i<1000; i++) { | |
console.log('Hello'); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment