How does Javascript react to errors?
<p>I have been quite curious about how javascript reacts to errors(like ReferenceError, for example). When it encounters a runtime error, it seems to return from the function that it is called in which, in turn, fails the function it was called in.</p>

<p>Does it consequently fail all the functions in the frame stack? 
(This is more of a question out of academic curiosity. Hope somebody can explain it to me?)</p>

<p>Thanks!</p>
