== : Equality Operator
On this page
Summary
Compares two values for equality. Returns true if values are equal, false otherwise.
Syntax
Operands
| Position | Type | Description |
|---|---|---|
| Left | Any | First value to compare |
| Right | Any | Second value to compare |
Returns
Type: Boolean
true if the operands are equal, false otherwise.
Examples
Basic Comparison
String Comparison
Data:
doc.Params["model"] = new {
status = "active"
};
Number Comparison
Boolean Comparison
Multiple Conditions
With #each
Precedence
Priority level in expression evaluation: 7 (after comparison operators)
Notes
- String comparisons are case-sensitive:
"Hello" == "hello"isfalse null == nullreturnstrue- Comparing
nullto any non-null value returnsfalse - Numbers and strings can be compared (automatic type conversion)
- Boolean values:
true!=false