Rick Waldron (2014-10-01T20:50:46.000Z)
On Wed, Oct 1, 2014 at 4:41 PM, Kevin Smith <zenparsing at gmail.com> wrote:

>
>>> ```js
>>> let map2 = new Map(map1.entries().filter((key, value) => key >= 0));
>>> let map2 = new Map(map1.entries().map((key, value) => [key * 2, value *
>>> 2]));
>>>
>>> entries() returns an iterator, not an array.
>>
>
> let map2 = new Map([...map1].map(([k, v]) => [k, v * 2])
>
>
Sorry for the almost-dup, didn't see this while I was typing.


Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141001/52e344d0/attachment.html>
forbes at lindesay.co.uk (2016-02-01T12:48:51.967Z)
> let map2 = new Map([...map1].map(([k, v]) => [k, v * 2])

Sorry for the almost-dup, didn't see this while I was typing.