This and the other “Deck” posts are a repurposing of flashcard study decks to Q&A blog posts.
When would you use the .ex extension for an Elixir file vs `.exs`?
.ex when you want to compile your code and
.ex when writing a script.
How would you execute a .exs file script from the command line?
Running the script above will execute the file without writing a compiled BEAM file to disk.
How would you execute a .ex file on the command line?
The above will write a compiled BEAM file to disk and you will be able to use the modules/functions you create in your Elixir environment.
More Elixir lang decks