Last Updated: September 09, 2019
·
783
· hemanth

NodeList to array javascript ES6

var $ = document.querySelectorAll;
var headings = [ ... $('h1') ];

Read more about the spread-operator

This works fine in the latest FF as of now, others are catching up!