Of these four values (null, true, false, undefined), three of them are reserved words (null, true and false), but the last value (undefined) is not a reserved word.... It's an identifier. More precisely, it's a property of the Global object (which is the window object if we execute inside a browser).

Why is that?

It is a problem, because being a property, you can change its initial value (which is the undefined value of course) to another value like so...

As a property of the global object you can't actually give it a new value from within a script running in a browser since if you assign a value to undefined in a browser it will assign the value to window.undefined and will not touch the global version.

The window object is not the same as the global object. There are only a few dozen or so properties and methods specific to the global object and to the best of my knowledge none of them can have their values in the global object changed from JavaScript running in a web page since any attempt to do so will just create a new version in the window object.

Examples of things that belong to the global object rather than the window object include:

isNaN()parseInt()encodeUri()eval()ObjectFunctionNumber

Changing the definition of any global property would break JavaScript - changing undefined would do relatively little harm compared to redefining Number or Function

undefined is NOT a property of the window object unless you create such a property. If you do create such a property then it will make the actual field inaccessible in those circumstances where the one you created is referenced. The actual undefined field will still be used in creating variables where a value is not assigned.

If this were not the case then

undefined = 'hello world;var x;

would set x to 'hello world'.

I don't know why undefined is not a reserved word but suspect that there is probably some obscure situation where it makes sense to be able to override it within a particular scope (probably not global scope) and that would not be possible if it were a reserved word.