DEV Community

Discussion on: Logical assignment operators in JavaScript

Collapse
 
cnt000 profile image
Edoardo Gargano

Nice work, thank you for sharing.

I understand better the ??= example with a console.log and changing assignment here: repl

So opts.dog ??= 'bow'; means: if opts.dog is not set, assign bow