Coming from Ruby, printing to console was often the fast & easy way to debug a problem.
Print to console
This is how we printed to the console in Ruby:
puts "Hello World"
With Elixir we use the
IO module and the
IO.puts "Hello World"
In Ruby, we can inspect (see the details) of an object with:
With Elixir we can use the
Print + Inspect
Ruby has an awesome shortcut to print to console and inspect the object:
Elixir has a similar shortcut with the