Logical Assignment Operators
bfults at gmail.com
Tue Oct 9 18:33:55 PDT 2007
As far as I can tell  there have never been logical assignment
operators (AND, OR) in ES and I can't access the spec on the wiki 
anymore, so I don't know if they're in the spec. I don't see anything
in the proposals section, so here's a proposal.
Add two operators to ES:
The purpose should be obvious, as they mirror the pattern of all other
shortcut assignment operators and have existed in other languages for
a long time.
a ||= 0
is the same as
a = a || 0
Any insight into the issues surrounding this part of the language
would be appreciated.
 - http://wiki.ecmascript.org/doku.php?id=spec:spec
More information about the Es4-discuss