To answer part of my own question, wrapping Array(N).keys()
with Array.from(...)
solves the issue by returning an array, rather than an iterator, which you can then call .map
on.
From VLAZ's response, it seems that some browsers only recently added support for map
on an Array Iterator.