I\'m trying to make a simple loop:
const parent = this.el.parentElement console.log(parent.children) parent.children.forEach(child => { console.log(chil
You can use childNodes instead of children, childNodes is also more reliable considering browser compatibility issues, more info here:
childNodes
children
parent.childNodes.forEach(function (child) { console.log(child) });
or using spread operator:
[...parent.children].forEach(function (child) { console.log(child) });