Closed DevilRoshan closed 4 years ago
出自小程序前端面试星球
// 以下代码输出 class Person { static str = 'static_str'; say = () => { throw new Error('Need To Implement') } } class Student extends Person(){ constructor(){ super(); } say(){ console.log(Student.str) } } const lihua = new Student(); console.log(Student.str); lihua.say()
https://github.com/DevilRoshan/Question/blob/master/20200804-js-code-class.md