Search⌘ K

Challenge: Print a Partial Collection

Explore looping through a collection in Ruby and learn to stop iteration at a defined item. Understand how to control output flow with condition checks and implement a custom message when stopping the loop.

Problem statement

Create a collection containing the words: hello, bye, morning, ...