I can't find any information on this, but suppose I have
var arr = [1, 2, 3];
var x = arr[1.5];
According to MDN: Array, array items are actually properties, and properties are identified by strings.
arr[1.5] is therefore the same as accessing
arr['1.5'], and Firefox does actually do it that way.
var x = [0,1,2,3,4,5]; x[1.5] = 42; alert(x); alert(x['1.5']); alert(x['1.50']);
0, 1, 2, 3, 4, 5 42 undefined
So, the item accessed using a floating point value is a property identified by the string representation of the number. Note that accessing an item using
'1.50' is not the same as accessing an item using
'1.5', so the index is not converted to a number.
I tested this in Internet Explorer and Chrome also, and they both do the same as Firefox.