const person1 = {
name: "Alex",
address: "Toronto"
}
const person2 = person1;
person2.name = "John";
console.log(person1);
Enter ...
For further actions, you may consider blocking this person and/or reporting abuse
'JSON.stringify' does not work if you use any memory references in your object:
Intrestingly, f is completely skipped in the output:
Yeah, that's a concern.
So,
structuredCloneis the only way.Is there any other workaround?
I am gonna edit my article with these later