Re:Why 1 && 2 == 2
by city41 on Friday July 19, 2013 @12:40AM
(#6068364)
It's not a new operator, but rather the X= form, where `foo X= 4` is sugar for `foo = foo X 4`
Just be careful with this in JavaScript, as the greater number of things that are falsy can bite you if you do `a = a || 10;`, which is a very common JS bug.
Just be careful with this in JavaScript, as the greater number of things that are falsy can bite you if you do `a = a || 10;`, which is a very common JS bug.