Status: New
Owner: ----

New issue 412 by sageptr: Object fields wrong order in for(... in ...)
http://code.google.com/p/v8/issues/detail?id=412

If object contains fields with numeric name, they go in strange order -
alphanumeric fields first, numeric fields last and sorted.

Example of code:
var x = {
   "yy": "yyy",
   "1": "one",
   "xx": "xxx",
   "0": "zero"
}
for(y in x){
   alert(y);
}
In V8 output order will be this:
yy, xx, 0, 1
In other script engines output order be this:
yy, 1, xx, 0 (as in declaration)

I don't know if it's V8 bug, but this issue is very strange.

--
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