Operators
Arithmetic Operators:
+ (addition)
- (subtraction)
* (multiplication)
/ (division)
% (modulus)
** (pow)
Bitwise Operators
& (and)
| (or)
^ (xor)
Comparison Operators
== (equal)
=== (identical)
!= (not equal)
!== (not identical)
< (less than)
> (greater than)
<= (less than or equal to)
>= (greater than or equal to)
matches (regex match)
contains
starts with
ends with
Logical Operators
! (not or)
&& (and or)
|| (or or)
String Operators
~ (concatenation)
Array Operators
in (contain)
not in (does not contain)
Numeric Operators
.. (range)
Ternary Operators
foo ? 'yes' : 'no'
foo ?: 'no' (equal to foo ? foo : 'no')
foo ? 'yes' (equal to foo ? 'yes' : '')
To find out more, please refer to the articles below:
Expression ExamplesSample Use CasesLast updated