---
title: "Discussion on \"How To Destructure An Object Using Existing Variables in JavaScript\" | Hashnode"
description: "Discussion on \"How To Destructure An Object Using Existing Variables in JavaScript\". A simple way to reuse existing variables and avoid annoying naming conflicts"
url: "https://hashnode.com/posts/how-to-destructure-an-object-using-existing-variables-in-javascript/605fbea338b0e14f092a2ecb"
---

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

Discussion

# [How To Destructure An Object Using Existing Variables in JavaScript](https://codebasement.hashnode.dev/how-to-destructure-an-object-using-existing-variables-in-javascript?utm_source=hashnode&utm_medium=feed)

A simple way to reuse existing variables and avoid annoying naming conflicts

Mar 27, 2021 · 4 min read · codebasement.hashnode.dev  
Updated Sep 28, 2023  
Read the article

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

## Written by

[Matheus Ribeiro](https://hashnode.com/@TheSirion)

@TheSirion · Niterói, RJ, Brazil

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

Trying to untangle the mess between web design and development

I believe programming can be a deeply creative skill. I like to find out about different ways to do things, methods, techniques and strategies that go beyond the conventional or just cool ways to solve problems. I'll share with you everything I learn as I learn it, in a way you can learn it too.

## Responses 1

Markdown supported · ⌘↵ to post

[Benoît Bouré](https://hashnode.com/@bboure)

[Mar 28, 2021](https://hashnode.com/posts/how-to-destructure-an-object-using-existing-variables-in-javascript/605fbea338b0e14f092a2ecb/comment/60601fbd5aa4944ee40f9873)

Awesome trick! I've been looking for a way to do this for a long time!

Thanks!

[Matheus Ribeiro](https://hashnode.com/@TheSirion)

[Mar 28, 2021](https://hashnode.com/posts/how-to-destructure-an-object-using-existing-variables-in-javascript/605fbea338b0e14f092a2ecb/comment/60601fbd5aa4944ee40f9873#reply-606042d738b0e14f092a344d)

Thank you! I'm glad you liked it!
