I want to move through just two indexes of an array. Something along these lines
iterate_amount = 2
array = [2,4,6,7]
iterate_amount.times do |x|
puts x
end #=> 2,4
I just don't know how I can place the 'array' in the loop to tell the interpreter this is the array I want to move through two indexes.