SOURCE

let val = {};
let obj = {'name': 'alvin', 'hobby': ['basket', 'ping', 'cheese'], 'count': null};
for(let key in obj) {
    val[key] = obj[key];
}

console.log(val);
obj.hobby[0] = 'sss';
console.log(val, obj);

val= obj;
console.log(val);
console 命令行工具 X clear

                    
>
console