question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ES Next: Logical assignment operators

See original GitHub issue

This 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:closed
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
3cpcommented, Jan 30, 2021

Good, I didn’t do that.

0reactions
KFlashcommented, Jan 30, 2021

It’s means it’s implemented in all browsers and is now part of the ECMA language, so no!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found