Convert NodeList to array
This snippet will get a NodeList containing the direct children of the body tag, and convert that NodeList to an array.
let mySelection = document.querySelectorAll('body > *');
mySelection = [].slice.call(mySelection);
This snippet will get a NodeList containing the direct children of the body tag, and convert that NodeList to an array.
let mySelection = document.querySelectorAll('body > *');
mySelection = [].slice.call(mySelection);