H
Haris Bogdanoviæ
Hi.
Is there a short way of creating array of numbers
with, for example, step of 10, like this:
10,20,30,40,50
By short I mean without going through iteration loop:
array=[]
(1..5).each do |i|
array.push i*10
end
Thanks
Haris
Is there a short way of creating array of numbers
with, for example, step of 10, like this:
10,20,30,40,50
By short I mean without going through iteration loop:
array=[]
(1..5).each do |i|
array.push i*10
end
Thanks
Haris