Yep. Wish we could use forEach on arrays. At the moment, I just convert them over to arrays by using the spread operator:
// return a node-list
const domItems = document.querySelectorAll('.dom-items')
// takes all those node-list items and dumps them in an array
const domItems = [...document.querySelectorAll('.dom-items')]
At first, I would just use the forEach and continue to treat it as a node-list unless but I needed it in an array form, but Babel apparently doesn't convert forEach to IE11 friendly syntax. So now, I just convert node-lists to arrays and then go on from there unless I add a specific IE11 polyfill.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.