ES Next: Logical assignment operators
See original GitHub issueThis proposal is completed (stage 4) and supported by TS, it’s expected to be part of ES2021. https://github.com/tc39/proposal-logical-assignment
It also works in most browsers today: https://caniuse.com/mdn-javascript_operators_logical_nullish_assignment
Can you add support for it?
I have code that uses ??=
and it doesn’t parse 😦
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (8 by maintainers)
Top Results From Across the Web
JavaScript Logical Assignment Operators
ES2021 introduces three logical assignment operators including: ... The logical OR assignment operator ( ||= ) accepts two operands and assigns the right ......
Read more >ES 12/2021 introduces new logical assignment operators
Logical AND assignment operator assigns a value to a variable if it is currently truthy. This helps us simplify some of the checks...
Read more >ESNext: Logical Assignment Operators (||=, ??=, &&=) – Bram.us
A new ECMAScript Proposal that I'm looking forward to is Logical Assignment Operators. In short it combines Logical Operators ( || , && ......
Read more >ES2021: Logical assignment operators - 2ality
The ECMAScript proposal “Logical assignment operators” (by Justin Ridgewell and Hemanth HM) introduces the following compound assignment ...
Read more >Logical OR assignment (||=) - JavaScript - MDN Web Docs
The logical OR assignment (x ||= y) operator only assigns if x is falsy.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good, I didn’t do that.
It’s means it’s implemented in all browsers and is now part of the ECMA language, so no!