Convert NodeList to Array quickly

20th January, 2020 1 min. read

Convert NodeList to Array quickly

Found here and repost in this blog for easier reminder to myself.

var array = [].slice.call(document.querySelectorAll("div"))

This comes in handy from time to time.


Spotted a typo or (likely) a grammar error? Send a pull request.