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);
Discussion on: JavaScript: Latest Stage-4 features
Replies for: Are you sure about ||= and the other operators? I thought that a ||= b actually meant a = (a || b) -- am I wrong?
For further actions, you may consider blocking this person and/or reporting abuse