For example:
var a = [];
a[5] = 'five';
a[2] = 'two';
a[11] = 'eleven';
a[210] = 'two-ten';
a[4] = 'four';
a[56] = 'fifty-six';
a[1] = 'one';
a[39] = 'thirty-nine';
for( var i in a ) {
if( a.hasOwnProperty(i) ) {
console.log(i+":"+a[i]);
}
}
Results in the following (for a few browsers I have handy to test.)
1:one
2:two
4:four
5:five
11:eleven
39:thirty-nine
56:fifty-six
210:two-ten
Is this standard, reliable behaviour?