JScript 10.0
new Operator
Creates a new object.
new constructor[( [arguments] )]
Arguments
Remarks
The new operator performs the following tasks:
-
It creates an object with no members.
-
It calls the constructor for that object, passing a reference to the newly created object as the this pointer.
-
The constructor then initializes the object according to the arguments passed to the constructor.
Example
These examples demonstrate some uses of the new operator.
var myObject : Object = new Object;
var myArray : Array = new Array();
var myDate : Date = new Date("Jan 5 1996");
Requirements
See Also