es6 class定义
class User { constructor(name, age) { this.name = name this.age = age } static print(age) { console.log(this.name + '---' + age) } sayHello() { console.log('hi ' + this.name) } } user = new User('howhy', 12) User.print(23) user.sayHello()