Mega Code Archive
Categories
/
Ruby
/
Statement
Stopping an Iteration
1.upto(10) do |x| puts x break if x == 3 end # 1 # 2 # 3