var arr=["test"]; for(var e in arr) console.log(e);
in IE11's console it outputs:
0 contains remove clear add addAll(all properties)
and in chrome's console only outputs 0
, which is expected.
how to fix it in IE? I know I can use for(var i=0;i<arr.length;i++)
to solve it.
but I just wonder why IE outputs all the properties.