I have some functions which occasionally (not always) will receive a callback and run it. Is checking if the callback is defined/function a good style or is there a better w
It can easilly be done with ArgueJS:
function save (){ arguments = __({callback: [Function]}) .....do stuff...... if(arguments.callback){ callback(); }; };