rubilicious

Learn Ruby the Hard Way

by Zed Shaw

Example 2

Previous   Next

This execise is about commenting out sections of code to make it more readable or to check the function of a cerain section of code by eliminating it. The symbol # is called an octothorpe, hash, pound sign, number sign.

# A comment, this is so you can read your program later.
# Anything after the # IS IGNORED

puts "I could have code like this." # and the comment after

# You can also use a comment to "disable code"
# puts "This will not run."
puts "This will run."