1.

The expression specified by the when clause is evaluated as the left operand. If no when clauses match, case executes the code of the else clause.(a) True(b) FalseThis question was addressed to me during an online interview.My enquiry is from The Case Conditional Statement in section Conditional Statements of Ruby

Answer»

The correct answer is (a) True

To explain: ELSE CLAUSE is EXECUTED only when no ‘when’ clauses MATCH.



Discussion

No Comment Found

Related InterviewSolutions