How do you add two numbers in Ruby?
A. add(a, b)
B. a + b
C. a.add(b)
D. b.add(a)
Answer: Option B
A. add(a, b)
B. a + b
C. a.add(b)
D. b.add(a)
Answer: Option B
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