← codetypingtest

Elixir typing test

Elixir runs on the Erlang virtual machine and borrows Ruby's friendly do ... end blocks. What makes it distinctive to type is the pipe operator |>, functions defined by pattern matching, tuples in braces and the & capture syntax, as in &Tree.insert(&2, &1).

Start the Elixir typing test

What you'll type in Elixir

Example: FizzBuzz in Elixir

cond do checks each condition in turn, with true -> as the catch-all at the end. Elixir uses rem(i, 15) rather than a % operator.

for i <- 1..15 do
  cond do
    rem(i, 15) == 0 -> IO.puts("FizzBuzz")
    rem(i, 3) == 0 -> IO.puts("Fizz")
    rem(i, 5) == 0 -> IO.puts("Buzz")
    true -> IO.puts(i)
  end
end

Type this program now

Tips for typing Elixir faster

All 20 Elixir programs

Every program is real, working Elixir. Choose one to start typing it straight away.

Beginner

Intermediate

Advanced

Expert

How the test works

The timer starts on your first key and stops once every character is right. Press Enter for a new line and the indentation is filled in for you. A wrong key shows in red and counts as a mistake; press Backspace to go back and fix it. Your best time for each program is saved in your browser. Read more about how speed and accuracy are calculated, or get tips for typing code faster.

Other languages