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
I have sinced moved to coffee-script and found default arguments is a nice way to solve this problem
doSomething = (arg1, arg2, callback = ()->)-> callback()