Some valid examples of commenting in Ruby: : Comments « Language Basics « Ruby






Some valid examples of commenting in Ruby:


puts "2+2 = #{2+2}" # Adds 2+2 to make 4
# A comment on a line by itself

 








Related examples in the same category

1.What are Comments
2.This block comment conceals several lines from the interpreter with =begin/=end:
3.Create comments in Ruby, using the # symbol.
4.Make sure trailing comments are far enough from the code