Extending Built In Objects
Creating Objects from Existing Objects
Creating New Objects Without Copying Existing Ones
Dot Notation and "this"
The dot notation allows us to identify which properties and methods apply to which objects while this allows us to reference the current object without knowing its name.
Using the prototype property of objects avoids the duplication of code for mathods attached to similar objects.
Inheritance and "constructor"
Associative Array Notation
Create Method if Doesn't Exist
Some really useful methods have been added to some objects in some but not all browsers. Use the built in method where it exists and add your own when it doesn't.
"self" and Multiple Objects
Once you start attaching event processing to objects different browsers associate 'this' with different objects. We can make sure we know what object we are referencing by copying 'this' into our own property - usually called 'self'.
Defining Objects with JSON
Private Properties and Privileged Methods
Public Access to Private Methods
One potential problem with public methods is that they may be overridden before you call the constructor which can break the constructor if the constructor needs to call the original version.
If a method doesn't have a useful value to return then returning a pointer to the current object will make it possible to chain methods together.