📜  javascript 复制没有引用的对象 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:21.751000             🧑  作者: Mango

代码示例1
var obj = {a: 25, b: 50, c: 75};
var A = Object.create(obj);
var B = Object.create(obj);

A.a = 30;
B.a = 40;

alert(obj.a + " " + A.a + " " + B.a); // 25 30 40