User Guide
Operators 27
Assignment operators
Assignment operators assign a value to its left operand based on the value of its right operand.
With the exception of the basic assignment operator, equal (
=), all of the following shortcut
assignment operators apply only to JavaScript syntax.
Logical operators
Logical operators test whether two logical expressions are true or false.
Use care when using logical operators and string operators in Lingo and JavaScript syntax. For
example, in JavaScript syntax
&& is a logical operator that determines whether two expressions are
true, but in Lingo,
&& is a string operator that concatenates two strings and inserts a space
between the two expressions.
!==
(JavaScript syntax only) Two operands are not equal and/or not of the
same type
1
<>
(Lingo only) Two operands are not equal 1
<
The left operand is less than the right operand 1
<=
The left operand is less than or equal to the right operand 1
>
The left operand is greater than the right operand 1
>=
The left operand is great than or equal to the right operand 1
=
(Lingo only) Two operands are equal 1
Operator Meaning Precedence
= Equal 1
x += y (JavaScript syntax only) x = x + y 1
x -= y (JavaScript syntax only) x = x - y 1
x *= y (JavaScript syntax only) x = x * y 1
x /= y (JavaScript syntax only) x = x / y 1
x %= y (JavaScript syntax only) x = x % y 1
Operator Effect Precedence
and
(Lingo only) Determines whether both expressions are true 4
&&
(JavaScript syntax only) Determines whether both expressions are true 4
or
(Lingo only) Determines whether either or both expressions are true 4
||
(JavaScript syntax only) Determines whether either or both expressions
are true
4
not
(Lingo only) Negates an expression 5
!
(JavaScript syntax only) Negates an expression 5
Operator Meaning Precedence