Possible Duplicate:
How to pass and call a function as an argument in Javascript?
Is the code bellow correct for executing a function passed as an argument to another function? Or should the line callback; be replaced with callback();, or something else?
function load(arg1, arg2, callback) {
var s = arg1 + arg2;
callback;
}
Also, would there need to be a different approach for passing anonymous functions as arguments? i.e.:
load(1, 2, function(){
// do something
});
You need to change this way: