Operators are symbols which represent an operation on an expression.
Operators
Notes
Operators are evaluated by precedence.
| Operator |
Description |
Precedence |
| Expression |
|
|
|
.
|
object operator |
7 |
|
( )
|
parentheses expression delimiter |
7 |
| Unary |
|
|
|
!
|
not operator |
6 |
|
+
|
plus operator |
6 |
|
-
|
minus operator |
6 |
| Binary - Arithmetic |
|
|
|
*
|
multiplication operator |
5 |
|
/
|
division operator |
5 |
|
+
|
addition operator |
5 |
|
-
|
subtraction operator |
5 |
| Binary - String |
|
|
|
+
|
concatenation operator |
5 |
| Binary - Relational |
|
|
|
<
|
less than operator |
4 |
|
>
|
greater than operator |
4 |
|
<=
|
less than or equal to operator |
4 |
|
>=
|
greater than or equal to operator |
4 |
|
=
|
equal to operator |
4 |
|
<>
|
not equal to operator |
4 |
| Binary - Logical |
|
|
|
and
|
and operator |
3 |
|
or
|
or operator |
3 |
| Assignment |
|
|
|
=
|
assignment operator |
2 |
| Sequence |
|
|
|
,
|
sequence operator |
1 |
Example
result = 10
x + 5
!doMore
isObject or isConstant
index < length
( offset + 10 ) / 2
max( value1, value2 )
|