---
title: "Discussion on \"In-depth Shallow Copy and Deep Copy\" | Hashnode"
description: "Discussion on \"In-depth Shallow Copy and Deep Copy\". Hello readers, there might be scenarios where we as a programmer/developer want to copy the values of the variables and use that variable in another task. In this case, we need to copy the value of that variable into another variable.\nIn JavaScript t..."
url: "https://hashnode.com/posts/in-depth-shallow-copy-and-deep-copy/627c3f05b7c3c8c34614e632"
---

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

Discussion

# [In-depth Shallow Copy and Deep Copy](https://blog.puneetpatel.com/in-depth-shallow-copy-and-deep-copy?utm_source=hashnode&utm_medium=feed)

Hello readers, there might be scenarios where we as a programmer/developer want to copy the values of the variables and use that variable in another task. In this case, we need to copy the value of that variable into another variable. In JavaScript t...

May 11, 2022 · 7 min read · blog.puneetpatel.com  
Updated Jun 1, 2022  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#array-methods](https://hashnode.com/tag/array-methods)
-   [#objects](https://hashnode.com/tag/objects)
-   [#object](https://hashnode.com/tag/object)
-   [#json](https://hashnode.com/tag/json)

## Written by

[Puneet Patel](https://hashnode.com/@PuneetP16)

@PuneetP16 · Gujarat, India

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

Front-End Web Developer

## Responses 2

Markdown supported · ⌘↵ to post

[Monu Shukla](https://hashnode.com/@getumank)

[May 12, 2022](https://hashnode.com/posts/in-depth-shallow-copy-and-deep-copy/627c3f05b7c3c8c34614e632/comment/627d4e2b168c80d47f461615)

Wonderful blog [Puneet Patel](https://hashnode.com/@PuneetP16) .

[Puneet Patel](https://hashnode.com/@PuneetP16)

[May 20, 2022](https://hashnode.com/posts/in-depth-shallow-copy-and-deep-copy/627c3f05b7c3c8c34614e632/comment/627d4e2b168c80d47f461615#reply-62875afc89168247f55ee5f7)

Thanks, Monu.

[Saurabh Chirde](https://hashnode.com/@Saurabhchirde)

[May 12, 2022](https://hashnode.com/posts/in-depth-shallow-copy-and-deep-copy/627c3f05b7c3c8c34614e632/comment/627cc2674903bec29b5865ec)

Such a detailed explanation with pictures!

[Puneet Patel](https://hashnode.com/@PuneetP16)

[May 20, 2022](https://hashnode.com/posts/in-depth-shallow-copy-and-deep-copy/627c3f05b7c3c8c34614e632/comment/627cc2674903bec29b5865ec#reply-62875b098fb776481a28481f)

Thanks, Saurabh.
