---
title: "Discussion on \"Deep copy vs shallow copy in Javascript\" | Hashnode"
description: "Discussion on \"Deep copy vs shallow copy in Javascript\". Shallow copy\n\nShallow copies duplicate as little as possible. A shallow copy of a collection is a copy of the collection structure, not the elements. With a shallow copy, two collections now share the individual elements.\n\nDeep copy\n\nDeep copies dupl..."
url: "https://hashnode.com/posts/deep-copy-vs-shallow-copy-in-javascript/61420b3e82e95e55a8738d62"
---

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

Discussion

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

Shallow copy Shallow copies duplicate as little as possible. A shallow copy of a collection is a copy of the collection structure, not the elements. With a shallow copy, two collections now share the individual elements. Deep copy Deep copies dupl...

Sep 15, 2021 · 2 min read · robinhooda.hashnode.dev  
Read the article

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

## Written by

[Robin Hooda](https://hashnode.com/@robinhooda)

@robinhooda · Bangalore

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

Full Stack Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
