// 链式调用
const line = {
init(val){
this.val = val;
return this;
},
add(next){
this.val += next;
return this;
},
value(){
let temp = this.val;
this.val = null;
return temp;
}
}
console.log(line.init(5).value())
return ""+line.init(5).add(5).value()