Primitive Types

Let’s learn about the properties of primitive datatypes in Elixir.

We'll cover the following

Elixir supports a short list of primitive types, including booleans, floats, integers, atoms, and references. We don’t have much guidance for primitive types since, for the most part, they behave much like they do in other languages. There are a couple things to note, though.

Numbers

Elixir numbers are integers and floats. Remember that floats are estimates. To elaborate on this, consider the following example:

Executable

Get hands-on with 1200+ tech skills courses.