// ES6 solution const children = [...parent.getElementsByTagName('tag')]; children.forEach((child) => { /* Do something; */ });
for(var x=0; x < boxesEL.length; x++) // comparison should be "<" not "<=" { boxesEL[x].value = "some value"; }