convert node list to array code example
Example 1: turn nodelist into array
Array.prototype.slice.call(document.childNodes);
Example 2: nodelist to array
Array.from(nodelist);
Array.prototype.slice.call(document.childNodes);
Array.from(nodelist);