JSFiddle - React, Tailwind, and code Playground
JavaScript
var arr = [10,20,30,40];
for(let x=0;x<10;x++){
setTimeout(function(){
console.log(x);
})
}
var arr = [10,20,30,40];
for(let x=0;x<10;x++){
setTimeout(function(){
console.log(x);
})
}