Stop using these JavaScript and TypeScript operator patterns
3 min readApr 27, 2023
Avoid tricky bugs and clarify your code by updating your operators.
With the release of the nullish coalescing and optional chaining operators, you may need to adjust a few of your ingrained patterns that you’re used to from older versions of JS. Specifically, those around testing for missing values in branching statements.