访问其伪造属性操作
作者:互联网
const user={ // name:"hundsun", // age:16 data:{name:"yss",age:12}, list:[ {price:12}, {price:12}, {price:13} ], //访问其伪造属性操作 get total(){ return this.list.reduce((t,l)=>{ return t+l.price },0); } } user.age=13; console.log(user.total);
标签:12,return,price,访问,user,total,伪造,age,属性 来源: https://www.cnblogs.com/yyy1234/p/15836402.html