Miguel
0
Q:

nodelist to array

Array.prototype.slice.call(document.childNodes);
4
Array.from(nodelist);
2
// Get all buttons as a NodeList
var btns = document.querySelectorAll('button');

// Convert buttons NodeList to an array
var btnsArr = Array.from(btns);
1
//spread the nodelist into an array
[...nodelist];
0

New to Communities?

Join the community