What difference does it make to do the following:
function (callback) {
var callback = callback || false;
combineCallback = function () {
callback.apply(window);
....
}
getJSON(combineCallback);
}
Or with this:
function (callback) {
var combineCallback = function () {
callback.apply(window);
....
}
getJSON(combineCallback);
}
Does it make any difference to write write var callback = callback || false;
?
false.apply()
andundefined.apply()
throw a similar error, so in that regard there is no difference. – Juhana May 31 '13 at 6:24