本文档基于 CC协议(Creative Commons Share-Alike License)发布,是developer.mozilla.com, www.mozref.comwww.aptana.com共同劳动的成果。

!=

Returns true if the two values are not equal.

Syntax

valueA != valueB

Example

var foo = 7;
if (foo != 5)
    return true; //Returns true because foo == 7.

Remarks

If the two values are of different types, JavaScript will attempt to convert one of them to the same type as the other to perform the comparison.