深克隆:
var obj1 = {name:'jack',age:18}
var obj2 = {}
obj2.name = obj.name
obj2.age = obj1.age
浅克隆:
var obj1 = {}
var obj2 = obj1
地址相同,浅
本文标题:深浅克隆小案例?
本文链接:https://www.haomeiwen.com/subject/izqqsctx.html
网友评论