Vidyalelo
Ruby Programming · Q31

Basic Syntax in Ruby

Programming · Ruby Programming · question 31

Q31

How do you check the truthiness of a value in Ruby?

A.
if (value) then code end
B.
if value do code end
C.
if value != false
Answer
D.
if value.is_truthy?

Answer: Option C

Solution

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