I do not wish to post multiple threads, for I feel as if that would be spamming. So I’ll try to contain all my question in this thread as possible. I’m usually at w3school thread. I want to expand my sources for help.
First question of many to come.(I laugh out uncontrollably with this insane nutty look on my face, as lighten and thunder flash and shout above me)
question 1:
If you know that none of the elements in your array evaluate to false in a boolean context — if your array consists only of DOM nodes, for example, you can use a more efficient idiom:
//Could someone implement this:
colors = ['red', 'white', 'blue'];
// into this:
var divs = document.getElementsByTagName('div');
for (var i = 0, div; div = divs[i]; i++) {
/* Process div in some way */
}
This avoids the overhead of checking the length of the array, and ensures that the div variable is reassigned to the current item each time around the loop for added convenience.
And explain what they are conveying to me?