Avoiding the extra array conversion

There's no need to convert to an array; forEach can be applied directly to the NodeList.