var aCoolFunction = undefined;
aCoolFunction && aCoolFunction();
What is the purpose of this?
aCoolFunction && aCoolFunction();
What is the purpose of this?
If a function is coming up undefined that I expect to be defined, that's an issue - not one I want to fail silently - because that is no fun to debug.
If something I expect to be defined isn't, that should throw an error and stop execution.
There are some edge cases where it may not matter and there is a legit reason why a function may sometimes be undefined, but I've never written code like that and can't think of anything that doesn't have a much better alternative.
getJSON(); // See how I don't care about the result