Convert NodeList to Array
The result of the code above is a true Array object containing all of the nodes returned by the QSA. You could even make the code shorter with this alternative:var nodesArray = .slice.call(document.querySelectorAll("div"));
Both snippets will give you an Array for which you can iterate over and do all those other awesome array things!
Read the full article at: Convert NodeList to
Read Full Post at David Walsh Blog