Strict Inequality Operator - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

See also
! logical NOT operator
,
operator
&& logical AND operator
operator

!== strict inequality operator

expression1 !== expression2
Tests for the exact opposite of the strict equality (
performs the same as the inequality operator except that data types are not converted.
If
is equal to
expression1
As with the strict equality (
being compared, as illustrated in the following list:
Numbers, strings, and Boolean values are compared by value.
Objects, arrays, and functions are compared by reference.
A variable is compared by value or by reference, depending on its type.
Availability: ActionScript 1.0; Flash Player 6
Operands
expression1 : Object
function.
expression2 : Object
function.
Returns
- The Boolean result of the comparison.
Boolean
Example
The comments in the following code show the returned value of operations that use the
equality (
), strict equality (
==
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
186
ActionScript language elements
,
!= inequality operator
,
|| logical OR operator
, and their data types are equal, the result is
expression2
) operator, the definition of equal depends on the data types
===
- A number, string, Boolean value, variable, object, array, or
- A number, string, Boolean value, variable, object, array, or
), and strict inequality (
===
,
!== strict inequality
,
)operator. The strict inequality operator
===
) operators:
!==
== equality
false
.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF