Ruby Ruby Loops Build a Simple Contact List Assigning Hash Values From Methods

Hello, I didn not understand the meaning "return" here. Could you please help me?

I simply have no solution for this task. Help please

contact_list = []

def get_name
  contact = {"name" => "", "phone_number" => "" }
    return contact["name"]


1 Answer

Steven Parker
Steven Parker
200,527 Points

The instructions tell you that the get_name method is defined "Elsewhere in the program", so you don't need to define it here.

All you need to do for task 1 is to call that method to assign the value of the "name" key.

Hint: it won't require any new lines of code, your changes will replace the first empty string.