Loop Through Elements By Name JS

// ES6 solution
const children = [...parent.getElementsByTagName('tag')];
children.forEach((child) => { /* Do something; */ });
Puzzled Puffin