Static methods are also known as class methods. These are associated with a class rather than an instance of a class. The constructor function is analogous to the factory class for objects in truly object oriented systems.
Static methods have no real use for the this keyword, as it is meant to refer to the receiving instance.
These are called static methods because they are not associated with a local instance.
See also: | Function object properties |
Prev | Home | Next |
Static filters | Up | Static variable |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |