---
title: "Discussion on \"Deep Copy vs Shallow Copy in JavaScript\" | Hashnode"
description: "Discussion on \"Deep Copy vs Shallow Copy in JavaScript\". Shallow Copy\nA new object is created that has an exact copy of the values in the original object. If the original object points to another object, a separate copy of that object is not created, rather a reference to that object is passed.\nconst a = {..."
url: "https://hashnode.com/posts/deep-copy-vs-shallow-copy-in-javascript/61156bd51f1bd93c4f35b753"
---

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

Discussion

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

Shallow Copy A new object is created that has an exact copy of the values in the original object. If the original object points to another object, a separate copy of that object is not created, rather a reference to that object is passed. const a = {...

Aug 12, 2021 · 2 min read · ahtrahdis7.hashnode.dev  
Updated Jan 7, 2022  
Read the article

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

## Written by

[Sidhartha Mallick](https://hashnode.com/@ahtrahdis7)

@ahtrahdis7 · India

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

building https://investorsync.in/

while (true) { build; measure; continue; }

## Responses 1

Markdown supported · ⌘↵ to post

[Faheem Khan](https://hashnode.com/@FaheemKhancodes)

[Aug 13, 2021](https://hashnode.com/posts/deep-copy-vs-shallow-copy-in-javascript/61156bd51f1bd93c4f35b753/comment/6115df72e249483e1210fe08)

Good article!

[Sidhartha Mallick](https://hashnode.com/@ahtrahdis7)

[Aug 13, 2021](https://hashnode.com/posts/deep-copy-vs-shallow-copy-in-javascript/61156bd51f1bd93c4f35b753/comment/6115df72e249483e1210fe08#reply-61160244e249483e1211005e)

Thanks.
