Артем Гуржий (2017-02-04T01:12:47.000Z)
Hi, I was thinking, is there a proposal for `or equal` operator as in ruby,
or is there any sense for doing so?
Example:
```js
let a = 1;
let b = 0;
a ||= b;
```
Would be interpreted as
```js
a = a || b;
```
PS:
Ruby version is
```ruby
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>
artem.gurzhii at gmail.com (2017-02-04T01:39:05.677Z)
I was thinking, is there a proposal for `or equal` operator as in ruby,
or is there any sense for doing so?
Example:
```js
let a = 1;
let b = 0;
a ||= b;
```
Would be interpreted as
```js
a = a || b;
```
PS:
Ruby version is
```ruby
a || a = b;
```
They are both equal, but for me, it doesn't look like the javascript version of
doing this.