Skip to content
Justice Tech School

Ruby Comments

# starts a single line comment. =begin and =end wrap multi line comments at the start of a line.

Example
# single line
x = 5 # inline
=begin
multi line
comment
=end
puts x

Result

5

Exercise

Start a comment.

 note

Quiz Test

Which starts a Ruby comment?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.