Question: If for instance we copy an object like this and modify a property in our copied object:

```
let user = { name: 'John' };

let admin = user;

admin.name = 'Pete'; // changed by the "admin" reference

alert(user.name); // 'Pete', changes are seen from the "user" reference

```

Why does: 

```
let user = { name: 'John' };
let admin = user;
user = null;
console.log(user); // will return null
console.log(admin);// will return {name: "John"}

```

Answer: 
First of all: that is not garbage collection, but I will not dwell on that since that's not your actual question.

In memory the space occupied by the object `{ name: 'John' }` is still storing that.

You just assigned `null` to one of the variables "pointing to it".

Imagine it as *pointers* like in c++:

`let user = { name: 'John' };`

```
 user ⟶ {name: 'John'}

admin    

```

`let admin = user;`

```
 user ⟶ {name: 'John'}
       ↗
admin 

```

`user = null;`

```
 user    {name: 'John'}
       ↗
admin 

```

And therefore "user" isn't really pointing to anything, it's pointing to the '**null**' point that basically means '*nothing*'.
There is a heavy misunderstanding on **how javascript works**

with

```
let admin = user;

```

you are **referencing** `user` in `admin` var, **not cloning** it at all.