深克隆:
var obj1 = {name:'jack',age:18}
var obj2 = {}
obj2.name = obj.name
obj2.age = obj1.age
浅克隆:
var obj1 = {}
var obj2 = obj1
地址相同,浅
深克隆:
var obj1 = {name:'jack',age:18}
var obj2 = {}
obj2.name = obj.name
obj2.age = obj1.age
浅克隆:
var obj1 = {}
var obj2 = obj1
地址相同,浅