JavaScript Classes: Static Methods

preview_player
Показать описание
The static keyword defines a static method or property for a class
Neither static methods nor static properties can be called on instances of the class. Instead, they're called on the class itself.

Static methods are often utility functions
Static properties are useful for fixed-configuration, or any other data you don't need to be replicated across instances.
Рекомендации по теме