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 }
All methods return something. Even if it's just a nil object, it returns something.
nil
It may as well return the original object rather than return nil.