On Wed, Oct 1, 2014 at 4:41 PM, Kevin Smith <zenpars...@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
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to