new
type
Type is the name of a data type.
The new
operator constructs a new object of the specified type and evaluates to the new object.
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.