let a = [1, 2];
let b = {age: 15};
a = new Proxy(a, {
get: function(t, k){
console.log(k);
return t[k];
},deleteProperty: function(t, k){
debugger;
delete t[k];
console.dir(arguments);
return true;
}
});
b = new Proxy(b, {
get: function(t, k){
console.log(k);
return t[k];
},deleteProperty: function(t, k){
debugger;
delete t[k];
console.dir(arguments);
return true;
}
});