An operator performs some computation on one or more variables. Operators can be classified as assignment, comparison, conditional, boolean, arithmetic, string, bitwise, and special. These operators are summarized in Table A-3
|assignment = += -= *= /= %= <<= >>= >>>= &= ^= |=||These operators assign a value to a variable.||
x = 3; y = fibonacci(10); x = "Hello." x = y; x += y // fills x with x + y x *= y // fills x with x * y
|comparison == != > >= < <=||These operators represent a relation between two expressions, evaluate to a boolean.||
x <= 10 5 != 4 // always evaluates // to true
|conditional ? :||This operator is a shorthand for if-then-else logic.||
y = (x < 0) ? 0 : x; ...