Why is this line valid in javascript ?
var a = 0[0];
After that, a is undefined.
There are situations where you could validly subscript a number in Javascript:
-> 0['toString']
function toString() { [native code] }
While not immediately apparent why you would want to do this, subscripting in Javascript is equivalent to using dotted notation (albeit the dot notation limits you to using identifiers as keys).