which allow you to access and change parts of the web page.
by looking at how to create custom objects before covering the Built-in and DOM Objects in later chapters.
this.method3 = function3;
In the above outline ''object'' refers to the name of the object - this can be any valid (and hopefully descriptive) name you choose to use. The ''parameters'' define the values that you will pass into the object when you instantiate it later. Each of these parameters is subsequently assigned to the corresponding internal ''properties'' of the object (the ''this'' keyword references the current object). The functions represent the methods of the object and are declared the same way as any other functions and reside outside the object definition.
We have also passed through parameters to initialize the properties of the object (make, model and color).
Next we need to understand how to call a method on an object and access an object property. This is achieved by using what is called dot
noation on the name of the object instance:
To access a property:
In our example we have a method called displayCar() to the 3 properties of the object.
Follwoing the above dot notation syntax we can call this method as follows: