es6实现单例模式 class类 静态方法
es6的 class类 又被叫做es5 构造函数的语法糖先看看es5怎么用构造函数实现类:function Person(name, gender) { this.name = name this.gender = gender}Person.prototype.say = function() { console.log('I am the say function inside Person')}let person1 = new Person('Dean', 'mal.