LoopRegular:## both 0 and 2 are inclusivefor count in 0..2 puts "Value of count is: #{count}"end # Output:Value of count is: 0Value of count is: 1Value of count is: 2CopySimilar to Java for-each loop#Javaint[] nums = { 'one', 'two', 'three', 'four' }for(int num: nums){ System.out.println(num);}CopyRubynums = ['one', 'two', 'three', 'four']for num in nums puts numend CopyTimes:#10.times { |i| puts "hello #{i}" }CopyRange#(1..10).each { |i| puts i }CopyStop a Loop?#break # java: break;CopySkip a loop?#next # java: continueCopyRedo?#Restarts current iterationTODORetry?#TODO