'undefined' variable works as key to object with 'undefined' property name
javascript
Solution
When you do `x.undefined` you are setting a property of `x` called `'undefined'`. The fact that it shares a name with `undefined` (a reserved word variable with `writable:false`) is coincidence.
Later on when you do, `console.log(x[y])`, you are looking for `y` in `x`. Keys of objects are strings, so `y` is converted to a string. When `undefined` is converted to a string, it becomes `'undefined'`. That's why `'Hello World!'` is returned.
Problem
Consider the following... ``` var x = {}; x.undefined = "Hello World!"; var y; //Prints "Hello World!" console.log(x[y]); ``` Working jsFiddle Why does this happen? Is it because of this, where it is returning a string instead of the actual undefined?