IO.puts() / IO.inspect()
Try it yourself →Prints the value to the screen.
Syntax
IO.puts(text) // IO.inspect(yapi)
Description
IO.puts prints text/number and moves to a new line. IO.inspect is used to view structures like lists and maps.
Example
IO.puts("Hello")
IO.inspect([1, 2, 3])Expected output
Hello [1, 2, 3]
When to use?
Showing results, debugging.