Changes

Jump to: navigation, search

JavaScript Object Basics

1 byte removed, 18:42, 19 September 2008
Creating and Using Object Instances
== Creating and Using Object Instances ==
In the previous section we learned how to create an object definition. It is important to note that, at this point, we have only described what the object will do (we have bascically created blueprint of the object), we have not actually created an object we can work with (this is known as an ''object instance''). Object instances are created using the ''new'' keywrod keyword and are assigned to an object variable that will be used to reference the object. For example, in the following example script we will create a new instance of the car object with the name myCar:
<pre>

Navigation menu