what are the output of the following script? every time I hit the same script on console, every time it’s run 0 to 9 but after that random number printed
for(i=0;i<10;i++){
setTimeout(console.log(i), 0);
}
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
what are the output of the following script? every time I hit the same script on console, every time it’s run 0 to 9 but after that random number printed
for(i=0;i<10;i++){
setTimeout(console.log(i), 0);
}