How to iterate through an array starting from the last element? (Ruby)

后端 未结 6 1957
别那么骄傲
别那么骄傲 2020-12-30 19:08

I came with below solution but I believe that must be nicer one out there ...

array = [ \'first\',\'middle\',\'last\']

index = array.length
array.length.t         


        
6条回答
提交回复
热议问题