When I read JavaScript The Definitive Guide, section 9.3, I encountered this:
Class methods
These are methods that are associated with the class rather than with instances.
How do I implement class methods in JavaScript?
When I read JavaScript The Definitive Guide, section 9.3, I encountered this:
Class methods
These are methods that are associated with the class rather than with instances.
How do I implement class methods in JavaScript?
You can just create a function as a property of another function:
function MyClass() {
}
MyClass.someFunction = function() { };