我想reverse_each_with_index在数组上使用类似的东西.
reverse_each_with_index
例:
array.reverse_each_with_index do |node,index| puts node puts index end
我看到Ruby有,each_with_index但似乎并没有相反.还有另一种方法吗?
each_with_index
ruby
ruby ×1