---
title: "Discussion on \"Shallow Copy vs Deep Copy\" | Hashnode"
description: "Discussion on \"Shallow Copy vs Deep Copy\". There are two ways of copying one variable into another.\n\nShallow Copy\nDeep Copy\n\nShallow Copy\nWhen a reference variable(object) is copied into another variable using an equal(=) operator, a shallow copy of the original variable is created, which mea..."
url: "https://hashnode.com/posts/shallow-copy-vs-deep-copy/629e33e0a6bfa0545795283d"
---

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

Discussion

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

There are two ways of copying one variable into another. Shallow Copy Deep Copy Shallow Copy When a reference variable(object) is copied into another variable using an equal(=) operator, a shallow copy of the original variable is created, which mea...

Jun 6, 2022 · 2 min read · rohit83.hashnode.dev  
Read the article

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

## Written by

[Rohit Prasad](https://hashnode.com/@rohit83)

@rohit83

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

I am a frontend developer.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
