If I remember correctly, older versions of Internet Explorer didn't support the for..in
statement.
I've no idea which versions though, and it's not the easiest thing to Google.
According to Microsoft, it's supported in Quirks Mode, and in standards mode from IE 6 onwards:
Which version of Internet Explorer added support for this?
As far as I can remember, every browser ever supporting JS has had to have support for ... in
because until recently it was the only way to enumerate the keys of an object.
It is supported at least in IE6+. The for-in loop is in Ecmascript 3 which browsers have supported for a very long time. You should feel as comfortable using for-in as any other JS construct.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With