题解 | #Proxy计数器#
Proxy计数器
https://www.nowcoder.com/practice/9911c5f8ecef4b3088ccbba397b7a984
let count = 0 const _proxy = object => { // 补全代码 const proxy=new Proxy(object,{ get(target,propkey){ if(propkey in target){ count++ return object }else{ count-- } } }) return proxy }