Ruby Ruby Collections Build a Grocery List Program Method Returns with Hashes and Arrays

what is wrong with my code

I have created a hash inside method with title and items whats . wrong

shopping_list.rb
def create_shopping_list
  hash = {"title" => "Grocery list" , "items" => Array.new}
  return hash
end

1 Answer

Steven Parker
Steven Parker
176,280 Points

The instructions ask for A string with the value "Grocery List". But you have "Grocery list" (with a lower-case "L").

ohh godd , thanks man.