any change in any of the objects property will effect the other so that code make all object copied by reference not by value i.e all those object point to the same memory location not just 2 instance with same value
I don’t really get the difference between console.log(JSON.parse(JSON.stringify(x))); and just console.log(x) — I just did a load of testing and couldn’t see any difference.
In the case of the question @justsomeone asked, it seems that when you do let person2 = Object.create(person1);, person2 is a different object, separate from person1.
Whereas is you do person2 = person1, person2is just a reference to the same object that is also stored in person1. Which is pretty much never what you want.
I don’t know, do you think I need to explain this somewhere? This is pretty obscure and confusing stuff