Here's a simple question for all of you:
So, I've got this for loop:
var pNewTag = document.createElement('p');
var grabWrapper = document.querySelector('.footerInfo');
var myArray = grabWrapper.children;
for ( var i = 0; i < myArray.length; i++ ) {
grabWrapper.children[i].appendChild(pNewTag);
pNewTag.innerHTML = " this works ";
}
The length of the array I'm using is 7, but the appendChild function within the loop only executes once. I want it to run on each iteration. Any ideas on what I'm overlooking?