Re:Silly Javascript
by eel on Saturday July 25, 2009 @03:46PM
(#723587)
Yes, JavaScript arrays are not true arrays. Yes, all property names are strings. If you use an integer as an index, it'll be converted to a string.
I suppose it's silly at first, but hopefully at some point, you grow used to it. Crockford's book JavaScript: The Good Parts is a good book that explains many of the oddities in JS.
I suppose it's silly at first, but hopefully at some point, you grow used to it. Crockford's book JavaScript: The Good Parts is a good book that explains many of the oddities in JS.