Basic Syntax In Ruby - Study Mode

[#1] What symbol is used to denote comments in Ruby?
Correct Answer

(B) #

[#2] Which symbol is used to concatenate strings in Ruby?
Correct Answer

(D) <<

[#3] What does the 'puts' method do in Ruby?
Correct Answer

(A) Prints to console

[#4] In Ruby, what is the keyword used to define a method?
Correct Answer

(D) def

[#5] Which of the following is a valid variable name in Ruby?
Correct Answer

(A) my_variable