SOURCE

var t = {
    money: 1000000000,
    house: "新疆海景房",
    car: {
        brand: "宝马",
        color: "pink"
    },
    aaa: [
        {
            brand: "宝马"
        }, {
            color: "pink"
        }
    ]
};
function deepcoppy(obj) {
    var newObj = {};
    for (let k in obj) {
        newObj[k] = typeof obj[k] === 'object' ? deepcoppy(obj[k]) : obj[k]
    }
    return (newObj);
}
let t2 = deepcoppy(t)
console.log(t2);

// 如果t变成这样呢?
console 命令行工具 X clear

                    
>
console