I create a very simple object in JavaScript and iterate over its properties by displaying the name of the property:
var name = { 'A': 'DataA', 'B': 'DataB', 'C': 'DataC', 'D': 'DataD', 'E': 'DataE' } for (var propName in name) { document.getElementById('result').innerHTML += propName + ' ' }
In IE and FireFox, it produces the expected result:
ABCDE
But in Chrome, the same code produces
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Any idea why? Does the value of the name keyword have some meaning in Chrome?
Yuriy galanter
source share