Operators

new

Supported By

Syntax

new type

Type is the name of a data type.

Description

The new operator constructs a new object of the specified type and evaluates to the new object.

Notes

If objects of the specified type cannot be constructed (as is the case with boolean or number), or if constructing a new object requires a name or ID number (as is the case with file), a script error will be triggered.

If new is used with the create command, the new object will be returned in the it variable.

Synonym

a new