Global has a couple of properties which are sometimes mistaken for language constructs. Variables like NaN, undefined, Infinity and functions like isNaN(), parseInt() and eval() are actually properties of the global scope. Whenever you use them, regardless of scope depth, they always have to be looked up all the way to the top of the scope chain.
This means that if any such property was redefined anywhere, that value is used instead. So you can redeclare undefined locally.
var undefined = 5;
alert(x === undefined); // false
alert(x === undefined); // true
Note that global is always the top of the scope chain. This is why you are able to refer to eval literally, instead of having to use global.eval(x).
Note that although most implementations allow you to refer to global as a literal, the specification does not seem to mention this explicitly. In browsers, window is the global object.
The following list of properties are defined by the specification:
- parseInt(string, radix)