Here are all the ones I have identified so far:
- The standard library includes the following global variables:
Array Boolean Date Function Number Object RegExp String Error EvalError RangeError ReferenceError SyntaxError TypeError URIError decodeURI decodeURIComponent encodeURI encodeURIComponent eval isFinite isNaN parseFloat parseIn Infinity JSON Math NaN undefined
. - Variable declarations introduce a variable in the scope. e.g.
var a, b, c, d=4
.- Note that variable declarations are all lifted. e.g.
function () { foob(x); var x = 12; }
is functionally equivalent tofunction () { var x; foob(x); x = 12; }
- Note that variable declarations are all lifted. e.g.
- Function statements and expressions. These not only bind the argument list but also create a local
arguments
variable.- Note that function statements are also lifted, e.g.
function () { funcstatement(12); if (false) { function funcstatement(y) { y + 4; } } }
is functionally equivalent tofunction () { function funcstatement(y) { y + 4; }; funcstatement(12); if (false) {}; }
- Note that function statements are also lifted, e.g.
- Named function expressions introduce the name in the scope of the function, e.g.
var x = function name() { /* 'name' available here */ }
. try {} catch (e) {}
introduces the variablee
only in the scope of the catch clause.