Search⌘ K
AI Features

Operators

Explore the various types of operators in Elixir and how they are used to manipulate data. Understand comparison, boolean, relaxed boolean, and arithmetic operators, their precedence, and how they evaluate different data types to produce results.

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 === ...