Ruby Ruby Collections Build a Grocery List Program Build a Grocery List Program: Part 1

Erick Rojas
Erick Rojas
4,355 Points

Return in ruby

Hi, I don't understand why do I need to put return in the method? In specific, how do "return" works?

1 Answer

Stivan Radev
Stivan Radev
7,686 Points
  • return just returns whatever you pass to it, for example, It can return an int, string, boolean... etc.