Powered by AppSignal & Oban Pro

Welcome to the Elixir Language Tour 🚀

introduction.livemd

Welcome to the Elixir Language Tour 🚀

This guide is your first step into the world of Elixir, a modern, functional programming language designed for building scalable and maintainable applications.

The guide is in fact an interactive version of the Elixir’s getting started guide by The Elixir Team (license). For now, only a part of the guide’s content is covered. We’re looking forward to your feedback - if you like it, we’ll extend it further! Please use the ‘give feedback’ button on the top right to share your feedback.

Navigation

You can navigate between steps using buttons below or using menu accessible with a button below Popcorn logo in the top-left content.

Code editor

This tour will walk you through Elixir’s core concepts with interactive examples. You can edit them, run them and the code you write is persisted. Click “Reset code” to bring back the original code if your experiments go a bit too far.

Hello, Elixir!

This tour will walk you through Elixir’s core concepts with interactive examples. Each code editor automatically displays the result of the last expression. Try running this simple arithmetic:

1 + 2

The editors share their scope, meaning variables defined in one editor are available in the next:

# A line that starts with # is a comment
# We'll use comments for short explanations and small exercises
# The exercises are additionally marked with 💡
message = "Hello, Elixir!"
message

You can also use IO.puts to print text to the output. Unlike the automatic result display, IO.puts prints to the standard output and returns :ok:

IO.puts("Hello, Elixir!")

Similarly, IO.inspect prints a representation of any value (in Elixir called “term”) and returns that value. You can specify a ‘label’ to include additional info:

IO.inspect(1 + 2, label: "Result")

It runs in your browser! 🍿

The code is executed inside your browser via WebAssembly, thanks to the Popcorn project. It is still under development and has some limitations. If you encounter any problems or have suggestions regarding the tour content, let us know by filing an issue in the project’s repo.

For information about data handling and privacy, please see our Privacy Policy.