Not-equal operation
Learn how to check if a value is not equal to another.
The not equal operation checks whether two values are different. Unlike relational operations, it works on any value, not just values that have a concept of order.
To check whether two values are different, place the != operator between them:
/*<operand>*/ != /*<operand>*/
Here's a practical example involving strings:
"hello" != "Hello" // true
And another one involving numbers:
1 != 1.1 // true
Although there is no natural language equivalent to the != operator, you can use the not equal to test for a more natural reading:
/*<operand>*/ is not equal to /*<operand>*/
Note that operations and tests may differ in their behavior and precedence. Please refer to the documentation of each specific operation and test for more information.