ECMAScript6(ES6)标准之class类的定义、继承及静态方法
1 类定义
我们先来看看我们一般的原型链方法
function Person(name, age){
this.name = name;
this.age = age;
}
Person.prototype.say = function(){
console.log('my name is ' + this.name + ', ' + this.age + ' yea...
原创
2019-07-30 11:06:28 ·
633 阅读 ·
0 评论