+ 1
What is hashtag symbol
3 Respostas
+ 14
#not just comments it is used for variable names inside strings too.
#copy paste the text and run in codeplayground
a = 5
while (a == 5)
puts "a = #{a}" # variable a inside a string parsed here
a +=2 # necessecary to terminate the condition
end
p "a is #{a} now "# a is now 7
+ 4
# <-- everything on this line after the hashtag symbol is a comment and will be ignored when your code runs.
+ 2
Oh ya, that too. lol