Vidyalelo
Ruby Programming · Q27

Methods in Ruby

Programming · Ruby Programming · question 27

Q27

Which of the following is a correct way to define a method that takes multiple arguments in Ruby?

A.
def method(arg1, arg2)
Answer
B.
def method(arg1, arg2); end
C.
def method(arg1 arg2); end
D.
def method(arg1 arg2)

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board