3 ms·
That error would have happened despite if the var was declared at the top or in the loop addEventListener("stuff", function() { return function(ind
by daleharvey 16y ago
That error would have happened despite if the var was declared at the top or in the loop
addEventListener("stuff", function() {
return function(index) {
alert(index);
}
}(i);
is the fix, either way
- isak2 16y agoYeah. I meant that the mistake is less likely to have been made in the first place.