I'm not 100% sure, but that's a pretty bizarre looking construct to me. And, if you put any real value in the second array, you will get NaN, undefined, or an error. I guess what's happening is type conversion, but only when the script parser can, in it's own odd way, make sense of the input. You're not adding, comparing, or concatting anything after the first array. And it's only because [0] apparently evaluates to nothing (not even as zero, null, an empty string, or false), and processing apparently stops there (actually just before there), that you're not having some kind of error. Hmm, odder than that because [0] appears to evaluate sometimes like a space would, and other times sort of as a semi-colon. Not really, because in that context a semi-colon would be a syntax violation, but in the sense of a sort of terminus.
Is there anywhere in javascript where [1][0] really means anything if it's not being used as the lookup for a named or otherwise defined multidimensional array for which it is a suffix?
Maybe it does, but I might have been absent that day.

Bookmarks