Other Operators
The remaining operators apply to topics considered in other chapters. We’ll include them here for quick reference only and describe their usage fully in those chapters.
The Bitwise Operators
If you’re planning to develop large-scale systems in which every iota of memory, calculation speed, and transfer-rate optimization makes a meaningful difference in performance, read about the bitwise operators in Chapter 15. Otherwise, use the Boolean logical operators, which perform the same tasks the bitwise operators do, albeit in a less optimized way.
The typeof Operator
The typeof operator is used to determine the datatype of an expression. It takes one operand, as follows:
typeof operand
;
where operand
may be any legal expression.
The return value of the typeof
operation is a
string indicating the datatype of the evaluated
operand
. See Chapter 3
for more details.
The new Operator
The new
operator creates a new composite datum
— either an array or an object. The object may be a member of a
built-in class or a user-defined class. The syntax for
new
is:
new constructor
where constructor
must be a function that
defines the properties of the newly created object. See Chapter 11, and Chapter 12.
The delete Operator
We use the delete
operator to remove an object, an
object property, an array element, or variables from a script. The
syntax for delete
is:
delete identifier
If identifier
is not a data container
(variable, property, or element), the delete
operation fails and returns the value ...
Get ActionScript: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.