js queryselectorall to array code example
Example 1: turn nodelist into array
Array.prototype.slice.call(document.childNodes);
Example 2: javascript querySelectorAll to array
const spanList = [...document.querySelectorAll("span")];
Array.prototype.slice.call(document.childNodes);
const spanList = [...document.querySelectorAll("span")];