let xyz = { a:5, b:6, c:7 };
let pqr = xyz;
pqr.a=8
console.log(xyz)
In the above code If I update a new variable Old variable is auto-updating.
why it’s Happening?
Can we use both variables separately?
let xyz = { a:5, b:6, c:7 };
let pqr = xyz;
pqr.a=8
console.log(xyz)
In the above code If I update a new variable Old variable is auto-updating.
why it’s Happening?
Can we use both variables separately?