how to convert document query to array code example
Example 1: nodelist to array
Array.from(nodelist);
Example 2: javascript querySelectorAll to array
const spanList = [...document.querySelectorAll("span")];
Array.from(nodelist);
const spanList = [...document.querySelectorAll("span")];