I'm a software engineer from Brazil, 4+ years building web applications. Exploring microservices, event-based choreographies, functional programming, and NoSQL.
Convenience operators, inspired by Ruby's. We already have a dozen mathematical assignment operators, but we don't have ones for the often used logical operators.
functionexample(a){// Default `a` to "foo"if(!a){a='foo';}}
A proposal to combine Logical Operators and Assignment Expressions:
// "Or Or Equals" (or, the Mallet operator :wink:)a||=b;a||(a=b);
Are you sure about ||= and the other operators?
I thought that
a ||= b
actually meanta = (a || b)
-- am I wrong?