Examveda

What is the correct way to define a conditional statement in Ruby?

A. if (condition) { code }

B. if condition then code end

C. if condition: code

D. when condition; code

Answer: Option A


This Question Belongs to Ruby Programming >> Basic Syntax In Ruby

Join The Discussion

Related Questions on Basic Syntax in Ruby