> Then thing is: if we'd like to use maps for such use-case, it brings us back > to that inconvenient imperative style of assignments (even worse, since you > have to repeat that `.set(...)` constantly): > > ``` > var requestData = new Map(); > requestData.set(Names.ID, id); > requestData.set(Names.EMAIL, email); > requestData.set('needsReload', id); > ... > ```
Note that you can chain: ```js var requestData = new Map() .set(Names.ID, id) .set(Names.EMAIL, email) .set('needsReload', id); ``` Not too bad, IMO. -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss