The following lines of JavaScript
try {
function _free() {}
var _free = 1;
} finally { }
result in the following error:
Uncaught SyntaxError: Identifier '_free' has already been declared
However, the following two blocks of JavaScript code don't:
Without the
tryblock scope:function _free() {} var _free = 1;Within a
functionscope:function a() { function _free() {} var _free = 1; }
But why?
(Testing environment: Chromium 61.0.3126.0)