2019年11月5日· 浏览 37· 评论 0ES6中的静态方法相比在ES5中的静态方法ES6定义的更加清晰,在ES6中定义一个静态方法只需要一个static关键字 下面请看example class Animal { constructor(type) { this.type = type } eat () { Animal.walk() console.log('我在吃') }…#ES6#javascript#静态方法