SOURCE

const obj = {
    name: 'kevin',
}

const handler = {
    get(target, key, recevier) {
        console.log('get', target, key, recevier);
        return Reflect.get(target, key, recevier);
    },
    set(target, key, value, recevier) {
        console.log('set', target, { key, value, recevier });
        cp
    }
}
console 命令行工具 X clear

                    
>
console