Status: Unconfirmed Owner: [email protected] Labels: Type-Bug Pri-2 OS-All Area-Misc
New issue 5543 by [email protected]: JavaScript core bug: numeric object property names (numbers and numeric strings alike) may break property order http://code.google.com/p/chromium/issues/detail?id=5543 Chrome Version : 1.0.154.36 on WinXP SP3 Other browsers tested: Safari 3: OK Firefox 1/2/3: OK IE 5/6/7: OK Opera 8/9: OK What steps will reproduce the problem? 1. Create JS object: var obj = {"3318": "first", "3320": "second", "3348": "third"}; 2. Loop through properties: for( var key in obj ) { alert(obj[key]); } What is the expected result? alerts: first, second, third What happens instead? alerts: second, third, first Please provide any additional information below. Attach a screenshot if possible. The result depends on the actual numbers used as property keys. Same result for same numbers, reproducible. I could not find any obvious pattern, though. This yields "third, first, second": {"1319": "first", "1320": "second", "1348": "third"} ...while this works as expected: {"2294": "first", "2371": "second", "2437": "third"} Different ways of creating the object (e.g. assigning properties one by one) make no difference. Neither does using numbers vs. numeric strings for property names. -- 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Chromium-bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/chromium-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
