3 ms·
Very few practical purposes. It was already described what it does - but the thing is, why would you ever want that? If a function is coming up undefined that
by nmjohn 12y ago
Very few practical purposes. It was already described what it does - but the thing is, why would you ever want that?
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.