---
title: "Discussion on \"How to Check undefined or null in JavaScript (ES2020 way)\" | Hashnode"
description: "Discussion on \"How to Check undefined or null in JavaScript (ES2020 way)\". 👋 Hey, there. What is the most common way you crash your program? For me, it's trying to de-reference null or undefined by accident. I still remember the first bug I created to crash a live website (bad idea to code in prod), staring at the 404 page..."
url: "https://hashnode.com/posts/how-to-check-undefined-or-null-in-javascript-es2020-way/60175cf06f46cc1ff950aaae"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Check undefined or null in JavaScript (ES2020 way)](https://ryanshan.hashnode.dev/how-to-check-undefined-or-null-in-javascript-es2020-way?utm_source=hashnode&utm_medium=feed)

👋 Hey, there. What is the most common way you crash your program? For me, it's trying to de-reference null or undefined by accident. I still remember the first bug I created to crash a live website (bad idea to code in prod), staring at the 404 page...

Feb 1, 2021 · 4 min read · ryanshan.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#bugs-and-errors](https://hashnode.com/tag/bugs-and-errors)

## Written by

[Ryan Shan](https://hashnode.com/@ryanshan)

@ryanshan

  
[View profile](https://hashnode.com/@ryanshan)

👨🏻‍💻 Full-time Software Engineer | ☕️ Fellow Coffee Lover

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
