0
In Ruby, what does the Puts "a = #{a}" do?
I can't figure out what the #{a} does, or what the # does. Here is the full code: a = 0 until a > 10 puts "a = #{a}" a +=2 end
2 Antworten
0
#{any_variable} inside the string just added value of this variable to string.
i.e.:
a = 8
puts "a = #{a}"
# result: a = 8
0
oh gotya its like %var% in batch code!
By the way this was a comment off of Spiil hellig's comment