TLDR Web Dev · QUICK LINKS

JAVASCRIPT'S ??= OPERATOR: DEFAULT VALUES MADE SIMPLE

trevorlasn.com2 min read

Summary from the TLDR Web Dev newsletter

The ??= operator can be used to handle null and undefined values in JavaScript by only assigning a new value if the current is null or undefined.