Object arithmetic--operator alternative to Object.assign

Bergi a.d.bergi at web.de
Wed Mar 11 14:23:46 UTC 2015


Bob Myers schrieb:
> Apologies if something like this has already been proposed and/or rejected
> for whatever reason.

I think you're looking for the same as 
http://wiki.ecmascript.org/doku.php?id=strawman:define_properties_operator

> It would be nice to have an operator alternative for Object.assign.

It uses an ":=" operator, so your example would read

obj1 := {x, y};

  Bergi



More information about the es-discuss mailing list