Operators

Learn about different kinds of Elixir operators and their usage.

An operator is used to manipulate individual data items and return a result. These items are called operands or arguments. Operators are represented by special characters or keywords. For example, the multiplication operator is represented by an asterisk (*). Elixir has a very rich set of operators. Here’s a list of all operators that Elixir is capable of parsing, ordered from higher to lower precedence, alongside their associativity:

  • Comparison operators
  • Boolean operators
  • Relaxed boolean operators
  • Arithmetic operators

Let’s cover them in detail.

Comparison operators

  • a===b shows the strict equality (so 1 === ...