---
title: "Discussion on \"JavaScript - Better way to check for Nullish Value\" | Hashnode"
description: "Discussion on \"JavaScript - Better way to check for Nullish Value\". When should you use ?? (nullish coalescing) and when || (logical OR)?"
url: "https://hashnode.com/posts/nullish-coalescing-operator-vs-logical-or-javascript/6059949c5771a2129446b240"
---

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

Discussion

# [JavaScript - Better way to check for Nullish Value](https://apoorvtyagi.tech/nullish-coalescing-operator-vs-logical-or-javascript?utm_source=hashnode&utm_medium=feed)

When should you use ?? (nullish coalescing) and when || (logical OR)?

Mar 16, 2021 · 3 min read · apoorvtyagi.tech  
Updated Dec 4, 2021  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#programming](https://hashnode.com/tag/programming)
-   [#es6](https://hashnode.com/tag/es6)

## Written by

[Apoorv Tyagi](https://hashnode.com/@apoorvtyagi)

@apoorvtyagi · India

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

Senior Software Engineer | Tech Blogger | !(Chess GM)

Senior Software Engineer. I write about practical tips and epic stories about my experiences in the field of computer science and engineering!

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
