I want to start iterating over an array from a specific index. How can i do this?
myj.each do |temp| ### end
Follow these steps:
your_array[your_index..-1].each do |temp| ### end
It would be more idiomatic to use Enumerable#drop :
Enumerable#drop
myj.drop(index).each do |temp| ### end
You can use a simple loop. Assuming array is arr, start index is "start" and end index is "end"
for i in start..end do #Access array items by arr[i] end