New operator
kdex
kdex at kdex.de
Tue Feb 13 21:15:42 UTC 2018
Please do some research before posting in the future.
[1] https://esdiscuss.org/topic/or-equal-operator
[2] https://esdiscuss.org/topic/proposing-a-conditional-assignment-or-equals-operator
[3] https://esdiscuss.org/topic/new-assignment-operators-not-bit-wise-or
[4] https://esdiscuss.org/topic/please-add-orequal-operator
[5] https://esdiscuss.org/topic/is-much-needed
[6] https://esdiscuss.org/topic/operators-and
[7] https://esdiscuss.org/topic/logical-assignment-operators
On Tuesday, February 13, 2018 10:05:18 PM CET Sebastian Malton wrote:
> Since the following is a decently common idiom I propose that we have a self
> referential version of it.
>
> Idiom:
> ```js
> myVar = myVar || "default" ;
> ```
>
> New Operator:
> ```js
> myVar ||= "default" ;
> ```
>
> Sebastian Malton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180213/c2a56455/attachment.sig>
More information about the es-discuss
mailing list