js class类 prototype原型链
<script type="text/javascript">
class Person {
constructor(name) {
this.name = name;
};
printName() {
alert(this.name);
}
}
var b = function(name) {
this.name = name;
}
b.prototype.ok = function() {
alert(this.name)
}
new Person('ok').printName();
new b('iii').ok();
</script>