Functions, Methods, and Objects

creating an object: Constructor notation

The new keyword and the object constructor create a blank object. You can the add properties and methods to the object.

constructor notation

Creating many objects: constructor notation

Sometime you will want several objects to represent similar things. Object constructors can use a function as a template for creating objects.

several objects

reating an instance of the date object

In order to work with dates, you creat an instance of the Date object. Y can then specify the time and date you want it to represent.

Date