Every expression in Ruby returns a value; in irb
, the value returned by the expression you’ve just executed is displayed after =>
.
The return value of Enumerable::each
is the object that called each
– in this case, the array [1,2,3,4]
Every expression in Ruby returns a value; in irb
, the value returned by the expression you’ve just executed is displayed after =>
.
The return value of Enumerable::each
is the object that called each
– in this case, the array [1,2,3,4]