>         for(var i in images){
>                 img.src = 'images/' + images[i];
>         }
> }

With `in`, you're iterating over the _properties_ of the Array object.
That  means  all  the  properties  and methods that hang off an array,
including a lot of [native code]!

While  `in`  will  include  the  numeric  array  _indices_  [1],  it's
basically useless for what you're doing.

Use a standard for (;;){} loop or Moo's Array.each(), etc.

-- S.



[1] Meaning:

( 0 in ['test'] == true )
( 5 in ['a','b','c'] == false )

... don't even bother with this area is my advice.

Reply via email to