Objects
Dependency
Human
OOP
Static Members
Static 方法不能被实例调用。
var BaseClass = function() {}; // var BaseClass=new Function();
BaseClass.f1 = function(){//定义静态方法
alert(' This is a static method ');
}
ref: https://www.cnblogs.com/signheart/p/6599838.html
ES6 中提供了更简洁的 static 语法实现。
Last updated
Was this helpful?