new

creates a new object

Syntax

new

Returns

object

Parameters

None

Usage

function Car(make, model, year) {
  this.make = make;
  this.model = model;
  this.year = year;
}

var car1 = new Car( 'Eagle', 'Talon TSi', 1993 );

echo( car1.model );