Q. In Ruby, what is the purpose of the `case` statement when combined with `when` clauses?

  • (A) To define a block of code that executes when a condition is met
  • (B) To iterate over a collection of elements
  • (C) To perform mathematical calculations
  • (D) To define a class
πŸ’¬ Discuss
βœ… Correct Answer: (A) To define a block of code that executes when a condition is met

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
144
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
86%
Success Rate