Rob's garden / notes / note

Note

#TIL the nullish coalescing assignment operator exists in #JavaScript. It only assigns the value if the current one is null/undefined.

const person = {}
person.name ??= 'Geoff Testington'
undefined

Nullish coalescing assignment (??=) - JavaScript | MDN