Quiz : what are the output of the following loop? [duplicate]

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);   
}