When to Use ‘??’ and ‘||’ in JavaScript and TypeScript
A short guide on when to use ‘??’ and ‘||’ when checking values in JavaScript and TypeScript code
Published in
2 min readSep 19, 2022
In this short post, I want to share a simple way to remember when to use ??
and ||
when checking values in JavaScript and TypeScript code.