+ 1
Which the aswer for the next code? And why?
Domnell Ral: [0,1,2,3,4,5,6,7,8,9,10] .forEach( i=>{ setTimeout(() => { console.log(i) }, 10000 - (i * 1000)) })
1 Resposta
+ 1
the wait time will be lesser for higher values of i.
so logically, the answer should be 0 to 10 in reverse order i.e. 10 first and 0 last