If it's a user defined function you can use:
console.log(callback.toString());
Otherwise you'll just get something like [native code]
since built in functions are not written in JavaScript.
Example:
function x(){}
// Prints "function x(){}"
(function(callback){ console.log(callback.toString()); })(x);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…