Say we have a Map: let m = new Map();
, using m.values()
returns a map iterator.
But I can't use forEach()
or map()
on that iterator and implementing a while loop on that iterator seems like an anti-pattern since ES6 offer functions like map()
.
So is there a way to use map()
on an iterator?