标签:his javascrip java array cti asc == fun turn
Object.prototype.clone = function(){ var o = this.constructor === Array ? [] : {} for(var e in this){ o[e] = typeof this[e] == ‘object‘ ? this[e].clone() : this[e] } return o } let a = { a: [1, 2], b: { a:[2,3] } } let b = a.clone() console.log(b)
标签:his javascrip java array cti asc == fun turn
原文地址:https://www.cnblogs.com/vmumu/p/12863908.html