摘要: https://blog.csdn.net/m0_37452696/article/details/78370504 继承特性1 - 实例成员继承 通过extends关键字实现继承 如果子类有构造器, 必须添加super()调用父类构造器 继承后子类实例便可使用父类实例的属性与方法 class An 阅读全文
posted @ 2018-09-07 14:16 一叶*秋 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 静态方法 静态方法属于类自己,通过类名.方法名调用 注意这里static关键字只能作用于方法,不能作用于属性 class Person { constructor() { Person.total++ || (Person.total = 1); }; // 统计总人口, static getTot 阅读全文
posted @ 2018-09-07 14:08 一叶*秋 阅读(1294) 评论(0) 推荐(0) 编辑

博客侧边栏公告广告位招租