SOURCE

// // es6的Object.assign
// Object.assign(target, source1, source2);

// // 扩展运算符
// {...obj1, ...obj2}

// // 数组的浅拷贝
// Array.prototype.slice
// Array.prototype.concat
function shallowCopy(object){
    if(!object || typeof object !== 'object') return;
    let newObj = Array.isArray(object);
    for(let k in object){
        if(object.hasOwnProperty(key)){
            newObj[key] = object(key)
        }
    }
    return newObj
}
console 命令行工具 X clear

                    
>
console