How do you pass arguments to a method in Ruby?
A. method_name(arg1, arg2)
B. method_name { arg1, arg2 }
C. method_name.with(arg1, arg2)
D. method_name arg1 arg2
Answer: Option A
A. method_name(arg1, arg2)
B. method_name { arg1, arg2 }
C. method_name.with(arg1, arg2)
D. method_name arg1 arg2
Answer: Option A
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