User Program Communication

Commenting in Ruby

Commenting is used to write text within the code that is ignored by the compiler.

#single line comment

Multi line comment
This is all
ignored by the compiler


Can be used for documentation, code descriptons, resource inclusion, readability, debugging, and any other note that the programmer would like to include.

#This code is written by Anthony

puts "I think I am cool"

The code below outputs the string:
'Because I am!'

puts "Because I am!"

Add to Slack

< User Input   |   Read from Text File >

© 2019 SyntaxDB. All Rights Reserved.