var myObject = new Object();
var myObjectCopy = myObject;
myObject.Name = 'alav';
// logs Name alav on both variable
console.log(myObject, myObjectCopy);
myObject = null;
// logs only myObject as null and myObjectCopy still has name 'alav'
console.log(myObject, myObjectCopy);
为什么当它们的引用相等时 myObjectCopy 不会变为 null。