---
title: "Discussion on \"How to set default values while destructuring\" | Hashnode"
description: "Discussion on \"How to set default values while destructuring\". One really handy thing JavaScript provide us is destructuring. I love it\nand it can make our code much cleaner. Let us take a look at a simple piece\nof code:\nconst profile = {\n  name: 'Telmo',\n  twitter: '@telmo',\n  age: 34,\n}\n\nNow, if we want to acc..."
url: "https://hashnode.com/posts/how-to-set-default-values-while-destructuring/60239d0f80da6c44eadf6649"
---

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

Discussion

# [How to set default values while destructuring](https://h.telmo.is/how-to-set-default-values-while-destructuring?utm_source=hashnode&utm_medium=feed)

One really handy thing JavaScript provide us is destructuring. I love it and it can make our code much cleaner. Let us take a look at a simple piece of code: const profile = { name: 'Telmo', twitter: '@telmo', age: 34, } Now, if we want to acc...

Feb 10, 2021 · 3 min read · h.telmo.is  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[Telmo Goncalves](https://hashnode.com/@telmo)

@telmo · Portugal

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

Developer who can design.

I've been a developer and designer for well over a decade. I write about JavaScript, React, Tailwind, Next.js and much more.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
