DEV Community

Discussion on: Five powerful JavaScript array methods.

Collapse
 
octocodeio profile image
Wojciech Dasiukiewicz

For me, one of the top useful functions from Array object is Array.from(). You can transform for example NodeList to regular Array of Objects

Collapse
 
jamesthomson profile image
James Thomson

You can transform for example NodeList to regular Array of Objects

You can also do this using the ES6 spread operator, e.g. const arr = [...document.querySelectorAll('div')];