How do I do OO programming in Javascript?
Object Oriented functionality (if you can call it that) in Javascript is radically different. A prototype-based language, such as JavaScript […] simply has objects. A prototype-based language has the notion of a prototypical object, an object used as a template from which to get the initial properties for a new object. Any object can specify its own properties, either when you create it or at run time. In addition, any object can be associated as the prototype for another object, allowing the second object to share the first object’s properties. [Core JavaScript 1.5 Guide:Details of the Object Model] So, there are no class objects in javascript, just function objects. The latter will be referred to as constructor function objects (CFO) throughout this document.