Google I/O 2019上提及的Javascript新特性

##使用#来定义私有属性 #count 是私有变量,不能通过 IncreasingCounter 实例访问 class IncreasingCounter { #count = 0; get value(){ console.log( ' Getting the current value!'); return this.#count++ } } 复制代码 子类可省略super(args); class Animal { constructo...