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

contact list

What I'm I missing

contact.rb
contact_list = []

contact = {"name" => "", "phone_number" => "" }

contact["name"].push(get_name)

1 Answer

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 56,116 Points

Hi Victor,

For this, replace the assignment of an empty string, "", with the call to the get_name method. That way, when the method returns the name, it is assigned into the name attribute of the hash.

Steve.