How can I extract the arguments (a, b) of a callback-function and add another
parameter (c) to the function-call?
function mycallback(a, b, c) {
// do stuff with a, b, c
}
function perform(callback) {
// I need to extract a and b here and add c:
// ???
//callback.apply(???);
}
perform( function() { mycallback(1, 2) } );
The only way I can think of is to pass the parameters to
performitself and then let it pass them along to the callback: