Map.prototype.clear method

Jason Orendorff jason.orendorff at
Mon Oct 22 12:14:17 PDT 2012

On Mon, Oct 22, 2012 at 1:32 PM, Domenic Denicola
<domenic at> wrote:
> On Mon, Oct 22, 2012 at 11:11 AM, Axel Rauschmayer <axel at> wrote:
>> What about copying of these new data structures?
> Isn't it already specced to work, for Set at least, since it accepts any
> iterable?
> let copy = new Set(original);
> I don't recall offhand if Map accepts an iterable of [key, val] pairs, but
> if it doesn't yet, maybe this provides an argument that it should.

Yes, it is specified that way in the latest draft. The Map in Firefox
supports this.


More information about the es-discuss mailing list