1.静态方法是不能被重写的,
2.静态方法直接通过类名调用—>(方便调用)
3.静态方法中不能调用非静态的方法,
4.静态方法能被继承
class Person{sayAge(){console.log(18);}static sayName(){this.sayAge()console.log('hello');}}var p = new Person()console.log(Person.sayName());console.log(p.sayName()); //不能用实例化的对象调用/* 静态方法|能|否被继承 */<script>class Person{static request(){console.log('hello');}}class Student extends Person{static getTop250(){this.request()}}Student.getTop250();</script>
