---
title: "Discussion on \"Object passing js references and copy\" | Hashnode"
description: "Discussion on \"Object passing js references and copy\". what is happening let a= {b:{c:1}} undefined let b = {...a} undefined b.b.a = 2 2 b.b.c = 3 3 b and why  \nWhat’s happening is: {...a} makes only a shallow copy.\nSo here:\nlet a = { b: { c: 1 } }\nlet b"
url: "https://hashnode.com/posts/object-passing-js-references-and-copy/69da29fbc8e5007ddb944312"
---

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

Discussion

# [Object passing js references and copy](https://dheerajmalik.hashnode.dev/object-passing-js-references-and-copy?utm_source=hashnode&utm_medium=feed)

what is happening let a= {b:{c:1}} undefined let b = {...a} undefined b.b.a = 2 2 b.b.c = 3 3 b and why What’s happening is: {...a} makes only a shallow copy. So here: let a = { b: { c: 1 } } let b

Apr 11 · 3 min read · dheerajmalik.hashnode.dev  
Read the article

## Written by

[Dheeraj Malik](https://hashnode.com/@iAmDheeraj)

@iAmDheeraj

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

I love web

I write here to learn, feel free to correct.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
