one line each loop ruby

1. 5.times { |i| puts "This is iteration number #{i+1}" }
2. (1..10).each { |num| puts num if num.even? }
3. loop { puts "This is an infinite loop" }
  1. This code will iterate 5 times, printing a message with the current iteration number.
  2. This code will iterate through numbers 1 to 10, printing only the even numbers.
  3. This code will create an infinite loop, printing a message indefinitely.