Vidyalelo
Ruby Programming · Q23

Basic Syntax in Ruby

Programming · Ruby Programming · question 23

Q23

What is the correct way to define a method in Ruby?

A.
def method_name(parameters) code end
Answer
B.
function method_name(parameters) code
C.
method method_name(parameters) = code
D.
method_name(parameters) -> code

Answer: Option A

Solution

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