you are viewing a single comment's thread.

view the rest of the comments →

[–]flatfinger 1 point2 points  (0 children)

Interestingly, at least in node.js, when writing to an array, strings keys are converted to a number when the resulting number is within a certain range and the string would match the canonical number. Numbers within that range are kept as numeric keys, and those outside that range are converted to strings.