stage-0,雜(1)
阿新 • • 發佈:2018-11-07
迫不及待的嘗試新特性,亂七八糟的入門demo
const box = {
weight: 2,
getWeight() { return this.weight; },
};
const { getWeight } = box;
box::getWeight();//等價於box.getWeight()
function add(val) { return this + val; }
console.log(box::getWeight()::add(5));//7