摘要: ES6 ES6中的类 类与ES5中的构造函数写法类似 区别在于属性要放入constructor中,静态方法和属性实列不会继承 <script> class Person{ height="178cm"; constructor(name,age){ //属性 this.name = name; th 阅读全文
posted @ 2020-01-11 16:29 小白蔡 阅读(190) 评论(0) 推荐(0) 编辑