Logical OR Assignment (||=)
Description
The Logical OR Assignment Operator (||=) assigns the value of the right operand to the left operand if the left operand is a false.
This Logical OR Assignment Operator provides a concise way to initialize variables or properties with a default value if they are not already set.
Learn More:
Browser Support
||=
is an ECMAScript1 (JavaScript 1997) feature.
It is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera |