Hi there
10.times do
puts "hi"
end
is there a way to stepping this? Something like
(10.times).step(2)
I know this does not work…
thx.
Hi there
10.times do
puts "hi"
end
is there a way to stepping this? Something like
(10.times).step(2)
I know this does not work…
thx.
Ah, coming soon… interesting.
Is this what you are looking for?
0.step(to: 9, by: 2) do |i|
puts "hi: #{i}"
end
Yes… that works the way i need.
thx.