Or Equal Operator

Артем Гуржий artem.gurzhii at gmail.com
Sat Feb 4 01:12:47 UTC 2017

Hi, I was thinking, is there a proposal for `or equal` operator as in ruby,
or is there any sense for doing so?
let a = 1;
let b = 0;
a ||= b;
Would be interpreted as
a = a || b;
Ruby version is
a || a = b;
They are both equal, but it doesn't look like the javascript version of
doing this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170204/764e1316/attachment.html>

More information about the es-discuss mailing list