var timer=function(){ for(var i=0;i - Study24x7
Social learning Network
29 Aug 2020 01:12 AM study24x7 study24x7

var timer=function(){ for(var i=0;i<10;i++){
setTimeout(function(){console.log(i)},1000)
}
}
timer();

what will bethe outpus of the above javascript code on console

A

0123456789all will be print in 1 second

B

012345678910all will print 0ne by one in 11 seconds

C

1111111111all will print in 1 second

D

10101010101010101010all wll print in 1 second

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles