`a ||= b` looks like an in-place logical or, like `+=`.

`a = a || b` would have very different semantics to that which you propose.

In Python this would be written:

```python
if a in [1, 2, 3, 5]:
    # stuff
```

In JS we have similar but slightly less semantic:

```js
if ([1, 2, 3, 5].indexOf(a) > -1) {
    // stuff
}
```

On Sunday, August 9, 2015, <myemailu...@gmail.com> wrote:

> it could be used like this:
>
> if ( a == 1 ||= 2 ||=3 ||=5) { //do something if a is either 1,2,3,5}
>
> and it could be used like this
>
> a || = 0
> // a = a || 0
>
> thanks
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to