if I get from params something like a 165. and this is number contains in array number 3 of 9. how to get this number of the array?
range = 50..450
cutter = range.last/50
b = range.each_slice(range.last/cutter).to_a
b #=> [[50, 51,..., 99],..., [400, 401,..., 450]]
How to get it?
ais undefined. Also, i don't understand whatbis supposed to represent, since the expression[[50..99]..[400..450]]is not valid Ruby (the lower/upper bound of a range can't be an array).irb, describe the output you receive, and the output you would like to see.b #=> [[50, 51,..., 99],..., [400, 401,..., 449], [450]].