If you think JavaScript throws errors immediately when you do something obviously wrong, try evaluating the following expressions in your console:
{}.foo
"foo" + 1
undefined + 1
None of these return any sort of error until much later when you get an exception like "Undefined has no properties", or worse, no exception at all just "foo1" or "NaN" printing in a place you expected an actual number. Good luck trying to debug any of these situations if the result gets passed to a callback and the actual exception finally occurs inside a promise inside a callback.No comments yet.