Google News
logo
Elixir - Interview Questions
Explain String Interpolation in Elixir
By definition, string interpolation is a practice used to join two strings together in a new object. An interpolated string is wrapped in the # function, as well as curly brackets.

Here’s an example of Elixir string interpolation :
x = "Apocalypse"

y = "X-men #{x}"

IO.puts(y)

x = "Apocalypse"

y = "X-men #{x}"

IO.puts(y)​
Advertisement