// var data = [123,2334,4567767,676,67,{name:"hsy",sex:'man'},[123,45663,2],78]
let data = {
ji:'haha',
arr: [123,2334,4567767,676,67,{name:"hsy",sex:'man'},[123,45663,2],78]
}
function deepcloneFN (arg){
let creatData = Array.isArray(arg)?[]:{}
for(let i in arg){
creatData[i] = typeof arg[i] === 'object'?deepcloneFN(i):arg[i]
// console.log(typeof arg[i] === 'object',i)
}
return creatData
}
let data2 = deepcloneFN (data)
// data.ji = "hhhhhhhh"
// console.log(data,'data')
console.log(data2)
// var arrs = {name:"namesss",age:'agess'}
// let data3 = deepcloneFN (data)
// console.log(data3)
console