Status: New
Owner: ----

New issue 291 by sgbeal: array indexes are always of type string
http://code.google.com/p/v8/issues/detail?id=291

Maybe this is correct behaviour, but it certain doesn't seem to be:

var ar=[23,43];
for( x in ar){print(typeof x,x,ar[x]);}

will output:

string 0 23
string 1 43

i would expect the array indexes to be integers/numbers, not strings,
especially when we explicitly give int indexes:

var ar=[];
ar[0]=23;
ar[1]=43;
for( x in ar){print(typeof x,x,ar[x]);}

will output:

string 0 23
string 1 43

This also happens when i create an Array using the C++ API and use
Integer::New(...) for the keys.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to