Assuming you have multiple div elements.
var nodeList = document.querySelectorAll("div"),
nodeArray;
// long version
nodeArray = Array.prototype.slice.call(nodeList);
// short version
nodeArray = [].slice.call(nodeList)
// ES6 version
nodeArray = [...nodeList]
Now you can use Array functions on nodeArray. Note that currently (2019) ES6 is only supported by the newest browsers. So, use first two methods.