I was just wondering;
Why does this work;
test = function(message) {
console.log('xxx');
}
setTimeout(test, 3000);
but not this;
test = function(message) {
console.log(message);
}
setTimeout(test('xxx'), 3000);
I know it should be written like this; But the version above would be so much more convenient...
test = function(message) {
console.log(message);
}
setTimeout(function() { test('xxx'); }, 3000);