Jump to content

Don't use for(var x in y)


Guest Nils

Recommended Posts

It would be great if you could remove all for(... in ...) loops from your javascript files and replace them by normal for(i=...;...;i++) loops. I know they work fine usually, but when you are using a library that extends the Object object (for example prototype), the loop returns several methods in addition to the array's items, which breaks several functions.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...