Explanation of [].slice.call in javascript?
I stumbled onto this neat shortcut for converting a DOM NodeList into a regular array, but I must admit, I don’t completely understand how it works: [].slice.call(document.querySelectorAll(‘a’), 0) So it starts with an empty array [], then slice is used to convert the result of call to a new array yeah? The bit I don’t … Read more