Commenting code helps programmers write free text that is commonly used to explain the code written, or can even be used to add TO-DOs to the code.
Single-line comments start with a
# I am a single line comment.
Multi-line comments start with
=begin and end with
=beginI am a multi line comment.I can take as many lines as needed.=end
Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.
- Anonymous contributors
Learn Ruby on Codecademy
- Anonymous contributorsAnonymous contributors