多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
>[success] # 链式调用 ~~~ const func1 = Symbol('func1') export default class Point { static [func1] () { } } class Counters{ constructor(count=0){ this.count = count } add(value){ this.count+=value return this } sub(value){ this.count -=value return this } } let counters = new Counters() counters.add(3).sub(1) console.log(counters.count) class PowCounters extends Counters{ pow (value){ this.count = this.count ** value return this } } let powCounters = new PowCounters(5) powCounters.add(3).sub(1) console.log(powCounters.count) ~~~