Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

hello world

How to write a "Hello World" program in Elixr

Educative Answers Team

Elixir is a programming language that was created using Erlang and runs on the Erlang virtual machine BEAM.

To write a “Hello World” program in Elixr, create a file named helloworld.exs. Next, paste the following code into it:

IO.puts("Hello, World!")

Then, from the command line, type the following command to execute the Elixir source file:

elixir helloworld.exs

This will print “Hello World” on the screen.


The puts function prints a message and adds a newline character at its end. Another variant is write, which does the same thing but doesn’t append a newline character. Both functions belong to the IO module, which has several functions to handle input and output.


hello world
Copyright ©2022 Educative, Inc. All rights reserved

View all Courses

Keep Exploring