please add orEqual operator
Michael A. Smith
michael at smith-li.com
Sun Aug 9 23:02:20 UTC 2015
I was going to suggest a Set, now that ECMA has them…
http://www.ecma-international.org/ecma-262/6.0/index.html#sec-set-objects
```js
if ((new Set([1,2,3,5]).has(a)) {
// stuff
}
```
On Sun, Aug 9, 2015 at 4:20 PM <myemailum14 at 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 at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150809/52593a30/attachment.html>
More information about the es-discuss
mailing list