Expressions and operators Flashcards
1
Q
What is the addition assignment?
A
+=
: Adds right operand to left operand and assigns the result to left operand. Works for both numeric addition and string concatenation.
Example: x += y
(is equivalent to x = x + y
)
2
Q
What is the operator for greater than or equal?
A
>=
: Compares two values; returns true
if left operand is greater than or equal to right operand.
Example: 5 >= 3 // true
2 >= 2 // true