3 ms·
Blimey is right. Although I would guess for most people their first encounter would be something like this: var foo = function(callback) { callback(); }
by sgentle 13y ago
Blimey is right. Although I would guess for most people their first encounter would be something like this:
var foo = function(callback) { callback(); }
for(var i=0; i<=10; i++){
setTimeout(function() {
console.log("i = " + i);
}, 100);
}
Which, if you don't know what to look for, is a bit of a brain melter. Between that and [1,2,10].sort(), there are lots of great reasons to yell at your screen when learning JS.