Compiler Problem
for (var i = 1; i <= 5; i++) {
(function(val) {
setTimeout(function() {
console.log(val);
}, val * 1000);
})(i);
}
Run this code on javascript compiler,its giving wrong output.
And because of this compiler Ihavlost a good opportunity
1 Answer
10 months ago by Kashiph Ahmad