Parameters
An expression or a variable that evaluates to a Boolean value.
expression
Returns
A Boolean value.
Description
Operator (logical); inverts the Boolean value of a variable or expression. If
variable with the absolute or converted value
expression
x && y
The following expressions illustrate the result of using the logical NOT (!) operator:
returns
!true
false
returns
!false
true
For more information, see
Example
In the following example, the variable
condition
!happy
file.
var happy:Boolean = false;
if (!happy) {
trace("don't worry, be happy");//traces don't worry, be happy
}
The statement traces because
See also
!= (inequality)
,
(equality)
=== (strict equality)
!= (inequality)
Availability
Flash Player 5.
Usage
expression1 != expression2
Parameters
None.
Returns
A Boolean value.
84
Chapter 5: ActionScript Core Language Elements
evaluates to
, the expression
false
"Operator precedence and associativity" on page
happy
, and if the condition is
equals
!false
,
!== (strict inequality)
, the value of
true
!(x && y)
is set to
. The
false
, the
statement sends a string to the log
true
trace()
.
true
,
&& (logical AND)
expression
is
!expression
false
evaluates to
.
true
32.
condition evaluates the
if
,
|| (logical OR)
is a
. If the
,
==
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?