Operator

An operator is a symbol that performs an action on values, such as + for addition, == for comparison, or && for logical AND.

General Programming

Operators are grouped by what they do: arithmetic (+, -, *, /), comparison (==, !=, <, >), logical (and, or, not), and assignment (=, +=).

Examples

Python

print(7 % 2)
print(3 > 2 and 1 < 0)

Output:

1
False

JavaScript

console.log(7 % 2);
console.log(3 > 2 && 1 < 0);

Output:

1
false

See also

Back to the Dictionary