1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2025-06-15 14:47:53 +02:00

elixir: add vars to hello world

This commit is contained in:
Rico Sta. Cruz 2017-09-15 19:12:14 +08:00
parent 6099a3117e
commit d63fedde3b
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A

View File

@ -17,7 +17,8 @@ weight: -10
# hello.exs
defmodule Greeter do
def greet(name) do
IO.puts "Hello, " <> name <> "!"
message = "Hello, " <> name <> "!"
IO.puts message
end
end