Repeating Something and number even?

To repeat something, Ruby provides us with times. We can use the do end block with it as shown below:

10.times do 
   puts "I love ruby"
end

Ruby provides .even? method to check if a number is even, .odd? method to check if a number is odd.

puts 2.even? // true
puts 21.even? //false
puts 2.odd?  // false
puts 21.odd?  //true