Re:Silly Javascript
by invisible on Sunday July 26, 2009 @01:36AM
(#724094)
When assigning a String with a numeric value I think JavaScript treats it as a numeric for an Array and a String for regular Objects. This doesn't really change the difference, just that an Array should hold numerical index values (vs an Object key, but they CAN hold regular keys since they are an Object). A bit confusing I guess...
[ Parent
| on HN ]
There are no comments on this comment yet.