Comment

Comment by spion

You can't avoid null and undefined in your code unless you avoid almost every language feature. Two particularly common ones:

* Accessing a missing property or method results with undefined. Hope you remember the exact method names and field names of all objects in your codebase!

* Using "str".match(regex) results with null if there are no matches.

parent spion 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton