![]() |
VOOZH | about |
Compatibility: Dart Sass is fully compatible with using equality operators, whereas LibSass and older versions of Ruby Sass (older than version 4.0.0) consider numbers as equal even if they have different units or if one has a unit and the other does not. This behavior was not useful and hence the newer versions have removed this as it violates transitivity. The equality operator tells whether the two values are equal or not.
Syntax: <expression> == <expression> The returned output for this shows whether the two expressions are equal, and <expression> != <expression> The returned output for this shows whether the two expressions are not equal. Two expressions are said to be equal if they have the same values and same types, this means different for different types shown below:
Example:
Output:
true
Output:
false
Output:
true
Example:
Output:
true
Output:
false
Example:
Output:
true
Output:
false
Example:
Output:
true
Output:
false
Output:
false
Example:
Output:
true
Output:
true
Example:
Output:
true
Output:
false
Example:
Output:
true
Output:
false