DEV Community

Discussion on: Nulls and null checks - How to work safely with nulls in any codebase

Collapse
 
sargalias profile image
Spyros Argalias • Edited

Hey, thanks for the suggestion. The optional chaining operator helps. However, it's just an if statement with more concise syntax.

In terms of the article, it would fall under the strategies of "use a null check around everything" or "remember to check for every null", depending on if you do it everywhere or only when you need it. However, the syntax isn't a strategy in itself.