How would I print "Hello" every nth of an iteration in ruby using something like:
50.times do
# every nth say hello
end
(0..10).step(2) do |it|
puts it
end
Outputs:
0
2
4
6
8
10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With