I am iterating over an array in MooTools but seeing additional items when iterating through the array using the shorthand for..in
loop. It works fine when I use
for..in
is not meant for array iteration. It iterates over all the properties of an object that are not built-in. Since MooTools has added more functions to Array prototype, they are now array properties as well. See this https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Statements/For...in
Just use a basic for loop for array iteration.