0
Why doesn't it work without multiplying by i ???
Please see the code below https://code.sololearn.com/WpTC8w3pY7mn/?ref=app Can you please explain me why this code doesn't work same way without multiplying by i (in line 11)? Thank you!
4 Réponses
+ 1
In this case all 15 timers have the same timeout value and will make output at the same time.
+ 1
JS (at least in web browsers) is single threaded: so "all at the same time" is not exactly true... output will occurs without delay between them, because the timers are all done when the first is done if all have the same value ;)
0
Igor Kostrikin Спасибо!
0
visph Thank you!