Comment #2 on issue 291 by sgbeal: array indexes are always of type string
http://code.google.com/p/v8/issues/detail?id=291
This feature is killing me. Consider:
var ar = ['a','b','c'];
for( var k in ar ){
print(k+2);
}
will print:
02
12
22
i have found a workaround, however: multiple the key by 1:
var ar = ['a','b','c'];
for( var k in ar ){
print((1*k)+2);
}
prints:
2
3
4
--
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
-~----------~----~----~----~------~----~------~--~---