Odd (or even) entries in a Ruby Array

前端 未结 0 1107
死守一世寂寞
死守一世寂寞 2020-12-23 04:32

Is there a quick way to get every other entry in an Array in Ruby? Either the odd or even entries values with 0 included in the odd. I\'d like to be able to use it like this

相关标签:
回答
  • 消灭零回复
提交回复
热议问题