try { x; // ReferenceError: x is not defined. function Fze(a, b) {a.unselectable = b} } catch(e) { } document.write("typeof Fze: ", typeof Fze, "\ntypeof e: ", typeof e);
Expected outcome for typeof Fze
is not specified by ECMA-262.
typeof Fze
results "function"
, then Fze
was interpreted
as a FunctionDeclaration. Otherwise if typeof Fze
resulted "undefined"
,
then Fze
was not reached as a Statement; the preceeding statement - x;
-
would trigger a ReferenceError, making it unreachable.
Expected outcome for typeof e
is "undefined"
.