javascript - Why is my for-in loop is looping double the size of my array? -
I am using an in-in loop to be an array of two elements, but this is twice Its like looping. / P>
I have an example here:
This is because the result is You can specify the nodelist in the array To turn on, use the "slice" method on the array prototype: In addition to this, you should be repeated with a numeric index with the array (or nodist for that node): GetElementsByTagName is not a simple array - it's a nodelist and it's "live"
Var slideer = [] .slice.call (slide, 0);
For
(var slideIndex = 0; slideIndex & lt; slideAlline; ++ slideindex) {
Comments
Post a Comment