---
title: "Discussion on \"Nullish coalescing (??) & Optional chaining (?.) in JS\" | Hashnode"
description: "Discussion on \"Nullish coalescing (??) & Optional chaining (?.) in JS\". Introduction\nWhile writing JavaScript code we come across multiple errors like\n\nTypeError: Cannot read property\n\nTypeError: ‘undefined’ is not an object\n\nTypeError: null is not an object\n\n\nand these errors were caused when we try to reference a varia..."
url: "https://hashnode.com/posts/nullish-coalescing-optional-chaining-in-js/63f7b9453f6fe0388fd524e9"
---

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

Discussion

# [Nullish coalescing (??) & Optional chaining (?.) in JS](https://amankumr.hashnode.dev/nullish-coalescing-optional-chaining-in-js?utm_source=hashnode&utm_medium=feed)

Introduction While writing JavaScript code we come across multiple errors like TypeError: Cannot read property TypeError: ‘undefined’ is not an object TypeError: null is not an object and these errors were caused when we try to reference a varia...

Feb 23, 2023 · 3 min read · amankumr.hashnode.dev  
Updated May 8, 2023  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#nullish-coalescing](https://hashnode.com/tag/nullish-coalescing)
-   [#nullish-coeleshing-operator](https://hashnode.com/tag/nullish-coeleshing-operator)
-   [#optional-chaining](https://hashnode.com/tag/optional-chaining)

## Written by

[Aman kumar](https://hashnode.com/@Kr794)

@Kr794

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

Software Developer @Accenture | Neog undergrad

Software Developer @Accenture | NeoG Undergrad | Frontend developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
