---
title: "Discussion on \"Deep and Shallow copy in JavaScript\" | Hashnode"
description: "Discussion on \"Deep and Shallow copy in JavaScript\". Deep copy and Shallow copy of an object is an important aspects of JavaScript and as a developer, it is useful to understand this concept.\nLet’s declare an object.\nlet obj1 = {x: 2, y: 3}\nobj2 = obj1;\n\n\nShallow Copy: It makes a copy of the reference ..."
url: "https://hashnode.com/posts/deep-and-shallow-copy-in-javascript/6369d86888bdfdd38cba7626"
---

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

Discussion

# [Deep and Shallow copy in JavaScript](https://aamrits.hashnode.dev/deep-and-shallow-copy-in-javascript?utm_source=hashnode&utm_medium=feed)

Deep copy and Shallow copy of an object is an important aspects of JavaScript and as a developer, it is useful to understand this concept. Let’s declare an object. let obj1 = {x: 2, y: 3} obj2 = obj1; Shallow Copy: It makes a copy of the reference ...

Nov 8, 2022 · 2 min read · aamrits.hashnode.dev  
Read the article

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

## Written by

[Amrit Anand](https://hashnode.com/@aamrits)

@aamrits · India

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

Frontend UI Engineer

I am a Frontend Engineer with a particular interest in developing Web Applications. I am a JavaScript enthusiast.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
