!== strict inequality operator

expression1 !== expression2

Tests for the exact opposite of the strict equality (=== )operator. The strict inequality operator performs the same as the inequality operator except that data types are not converted.

If expression1 is equal to expression2, and their data types are equal, the result is false. As with the strict equality (===) operator, the definition of equal depends on the data types being compared, as illustrated in the following list:

Availability: ActionScript 1.0; Flash Player 6

Operands

expression1 : Object - A number, string, Boolean value, variable, object, array, or function.

expression2 : Object - A number, string, Boolean value, variable, object, array, or function.

Returns

Boolean - The Boolean result of the comparison.

Example

The comments in the following code show the returned value of operations that use the equality (==), strict equality (===), and strict inequality (!==) operators:

var s1:String = "5"; 
var s2:String = "5"; 
var s3:String = "Hello"; 
var n:Number = 5; 
var b:Boolean = true; 
trace(s1 == s2); // true 
trace(s1 == s3); // false 
trace(s1 == n); // true 
trace(s1 == b); // false 
trace(s1 === s2); // true 
trace(s1 === s3); // false 
trace(s1 === n); // false 
trace(s1 === b); // false 
trace(s1 !== s2); // false 
trace(s1 !== s3); // true 
trace(s1 !== n); // true 
trace(s1 !== b); // true 

See also

! logical NOT operator, != inequality operator, && logical AND operator, || logical OR operator, == equality operator, === strict equality operator


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00001303.html