4 ms·
> The Array.from() static method creates a new, shallow-copied Array instance from an array-like or iterable object[0] So, do this instead: Array.from($no
by lhorie 5y ago
> The Array.from() static method creates a new, shallow-copied Array instance from an array-like or iterable object[0]
So, do this instead:
Array.from($nodeList, myFn)
[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- merrywhether 5y agoI never knew this mapping variation of Array.from, that is slick! Also serves as a great example of how JS is standardizing useful patterns that were previously accomplished via bending the language a bit.