Flaw iterating JS array
Status: Beta
Brought to you by:
bkoehn
Iterating JavaScript arrays may not be done using
for (var i in array){...}
It is possible and quite common for other libraries to add functions to the array prototype thus corrupting the iteration.
Instead use
(for var i = 0; i < array.length; i++){
// ... do something with array[i]
}