OperaとhasOwnProperty
Opera8では
o = {1:1, 3:3, 5:5, foo:'foo'}; for(i in o){ alert(o.hasOwnProperty(i)); // false, false, false, true }; o.hasOwnProperty(1); // true o.hasOwnProperty('1'); // false
fxやieでは
for(i in o){ alert(o.hasOwnProperty(i)); // true, true, true, true }; o.hasOwnProperty(1); // true o.hasOwnProperty('1'); // true
そうですか…。
あと
for(i in o){ alert(typeof(i)); // string, string, string, string };
for(i in {001:'foo', 002:'bar', 003:'hoge'}){ alert(i); // 1, 2, 3 };