Why you’ll write JavaScript before Elixir here
If you came here to learn Elixir, you will not touch it at first. Refactoring and Tracing - the first two steps on the path - both use JavaScript.
That is deliberate. It is not a bait-and-switch.
The actual problem isn’t syntax
Elixir’s syntax is approachable. def, pattern matching, and the pipe operator are easy to read once you’ve seen them a few times. The hard part of moving from JavaScript to Elixir is un-learning one habit: reaching for a for loop and a mutable accumulator whenever you transform a list.
Once that habit is ingrained, you stop noticing it. You do not think, “I am now writing an imperative loop.” You think, “this is just how you process a list.” So before this site asks you to write a line of Elixir, it examines that habit in JavaScript - whose C-style syntax is the most widely-read starting point there is.
What Refactoring and Tracing actually train
Refactoring gives you working imperative JavaScript - a for loop building an array, a mutable flag tracking whether something was found - and asks you to rewrite it as map, filter, or reduce. You are not learning what reduce does. You are learning to recognize the shape of a problem that reduce solves. That skill transfers directly to Elixir’s Enum module.
Tracing goes the other way. It gives you an expression and asks you to predict its value step by step. This matters just as much. Functional code is read by substitution: you trace an expression by replacing names with their values until you reach a result. If you have only ever run code and watched a debugger, tracing by hand uses a different muscle. Elixir’s pattern matching and recursion will ask you to use that muscle constantly.
Once both skills feel comfortable, Substitutions, Functions, and Logic remove the JavaScript syntax and drill the underlying ideas - variable binding, function composition, boolean evaluation - as language-neutral math. By the time you reach Algebraic Laws and write your first real Elixir, the functional thinking is already there. Syntax is the only new part left. Syntax was never the hard part.
Work top to bottom
The dashboard lists every step in this order for a reason. If you already write map/filter/reduce reflexively and trace expressions in your head without thinking, skip ahead - nothing here gates on the step before it. But if a Refactoring exercise makes you reach for a loop out of habit, that is the signal this site is designed to catch. Stay there a little longer.
Read how practice works here to see how the tiers, hints, and spaced repetition fit together.
Where to go next
-
Functional JavaScript vs. functional Elixir
- the same functional style, two runtimes: where the performance really goes, and where it does not.
-
Reading Elixir as a JS developer
-
the mapping table this article’s argument sets up:
constto=, loops toEnum, and the one habit that will actually trip you up.
-
the mapping table this article’s argument sets up:
-
Currying in JavaScript vs. Elixir
- the same idea, opposite decisions, in the two languages this article is about.