I\'m trying to understand why I\'m getting the following error, not how to work around it.
Passing the following code to JSLint or JSHint yields the er
Check this answer out: JSLint complaining about my try/catch
As has mentioned, try
opens a new block-scope. See https://developer.mozilla.org/en/JavaScript/Reference/Scope_Cheatsheet
Indeed the top of the document explains that it's not all standard, but in ES5, section 12.14 the section on executing a catch
block clearly defines MDC's description as standard:
No matter how control leaves the Block the LexicalEnvironment is always restored to its former state.