Re:Search: .lenght - Github
by kaffeinecoma on Saturday January 14, 2012 @02:17PM
(#3464990)
Yes, but it would raise the exception at run-time, and only when the particular path is taken.
There's actually no exception, it just returns "undefined" and the if statement fails. That's why it's such a deadly bug -- no exception, and path dependent. Combine that with the async nature of JS and it's going to be a long night tracking that one down
The way javascript (which is what is linked) handles this, as amirhhz described it, leads to silent errors which could turn out a lot worse.