JavaScript

Logical Assignment Operators — JavaScript

Use these useful JavaScript operators to write less code

Jeroen Ouwehand
ITNEXT
Published in
2 min readMay 30, 2022

--

Photo by TheRegisti on Unsplash

Since the EcmaScript 2021 version, there are three new assignment operators available. “Logical assignment operators” to be exact. Sounds like a mouthful, but it is only a shorthand way of writing a condition and assigning it. Let’s dive in.

--

--