> The only time for..in should be used with Array is for (very) sparse > arrays to save time when iterating over its elements.
for...in is way slower than the regular for(var i = 0, len = array.length; i < len; i++) for..in should NEVER be used over arrays except to do what it's meant to: iterate over properties. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
