← Back to release summary

JavaScript logical assignment operators

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 85)
Intent stage
Start prototyping

Summary

Adds the logical assignment operators ||=, &&=, and ??= to JavaScript.

Motivation

This rounds out the compound assignment operators to also include logical binary operators. Currently only mathematical and bitwise binary operators are supported. This is an incremental improvement for shipping terser, clearer JS.

Standards & signals

Docs: https://github.com/tc39/proposal-logical-assignment/blob/master/README.md

Explainers: https://github.com/tc39/proposal-logical-assignment/blob/master/README.md

View on chromestatus.com