Placing output


#1

array = [1,2,3,4,5]

array.each do |x|
x += 10
print "#{x} "
puts array
end

Hello, i'm Hugo. I was wondering, when the output is shown on the screen, like this,

11 1
2
3
4
5
12 1
2
3
4
5
13 1
2
3
4
5
14 1
2
3
4
5
15 1
2
3
4
5
[1, 2, 3, 4, 5]

i wanted the array to be shown underneath the results form the array.each. i tried putting it under and above. but putting in above just showns prints a second array, before the result and beneath prints it from above to below from the end of the result. also i don't want it to show nil anymore.

thank you for reading, i hope it makes sense.


#2

Not really sure what you're trying to accomplish, but if you just want to see the array elements + 10, you just have to take out puts array and it should be good to go.