Example
In the following example, the variable
condition
!happy
Output panel.
happy = false;
if (!happy) {
trace("don't worry, be happy");
}
!= (inequality)
Availability
Flash Player 5.
Usage
expression1 != expression2
Parameters
None.
Returns
A Boolean value.
Description
Operator (inequality); tests for the exact opposite of the
, the result is
expression2
data types being compared.
•
Numbers, strings, and Boolean values are compared by value.
•
Variables, objects, arrays, and functions are compared by reference.
Example
The following example illustrates the result of the
returns
5 != 8
true
returns
5 != 5
false
This example illustrates the use of the
a = "David";
b = "Fool"
if (a != b){
trace("David is not a fool");
}
See also
!== (strict inequality)
230
Chapter 12: ActionScript Dictionary
happy
, and if the condition is
. As with the
false
!=
,
== (equality)
is set to
. The
false
, the
action sends a string to the
true
trace()
operator. If
==
operator, the definition of equal depends on the
==
operator:
!=
operator in an
statement.
if
,
=== (strict equality)
condition evaluates the
if
is equal to
expression1
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers