a = [0,1,2]Ranges as are not arrays.
a.each do |b|
puts b
if 1 == (b % 2)
a << a.last + 1
end
end
a = (0..2)
a = [0,1,2]Ranges as are not arrays.
a.each do |b|
puts b
if 1 == (b % 2)
a << a.last + 1
end
end
a = (0..2)
(you can learn about the bigger picture I'm working towards on my patreon page )