In the previous lesson we saw the code given below.
In this case method info
is using puts
to print the message.
Now let's change the code such that method info
returns the message and we print
the message after calling the method info
.
In the above case both the methods get_city
and info
are returning values and the printing
is being done at the very end.