I\'m learning the details of how each works in ruby, and I tried out the following line of code:
each
p [1,2,3,4,5].each { |element| el }
If you want, for some reason, to suppress the output (for example debugging in console) here is how you can achive that
[1,2,3,4,5].each do |nr| puts nr.inspect end;nil