---
title: "Discussion on \"Optional Chaining in JavaScript\" | Hashnode"
description: "Discussion on \"Optional Chaining in JavaScript\". Introduction\nConsider the following line of code:\nconst iceCream = menu?.dessert?.icecream\nIf you've used optional chaining before, then you can easily tell what's going on in the above line of code. The above example is a prominent example of option..."
url: "https://hashnode.com/posts/optional-chaining-in-javascript/62d999c559f0dc59d51f0d36"
---

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

Discussion

# [Optional Chaining in JavaScript](https://nakulsharma.hashnode.dev/optional-chaining-in-javascript?utm_source=hashnode&utm_medium=feed)

Introduction Consider the following line of code: const iceCream = menu?.dessert?.icecream If you've used optional chaining before, then you can easily tell what's going on in the above line of code. The above example is a prominent example of option...

Jul 21, 2022 · 4 min read · nakulsharma.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#optional-chaining](https://hashnode.com/tag/optional-chaining)
-   [#webdev](https://hashnode.com/tag/webdev)

## Written by

[Nakul Sharma](https://hashnode.com/@nakulsharma)

@nakulsharma · Delhi, India

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

Web Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
