Which of the following is the correct way to define a range in Ruby?
A. (1..10)
B. [1 to 10]
C. {1..10}
D. <1,10>
Answer: Option A
Related Questions on Basic Syntax in Ruby
What does the 'puts' method do in Ruby?
A. Prints to console
B. Converts to string
C. Finds the length
D. Reads input from user

Join The Discussion