Skip to main content

🛍️ CYBER MONDAY ALL WEEK get-one-give-one sale is underway. Don't miss $50 off PLUS a free subscription to gift a friend. 🤩

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Ishan Sharma
    Ishan Sharma
    2,480 Points

    what is wrong with my code

    Posted June 8, 2019 7:14am by Ishan Sharma
    Ishan Sharma
    2,480 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Richard Wentford
    Richard Wentford
    19,730 Points

    Modifying method to return a hash

    Posted July 14, 2018 12:26pm by Richard Wentford
    Richard Wentford
    19,730 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Simon Goldman
    Simon Goldman
    1,028 Points

    shopping list

    Posted December 8, 2016 10:53pm by Simon Goldman
    Simon Goldman
    1,028 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Yuichi Narisawa
    Yuichi Narisawa
    19,548 Points

    How can I fix this code?

    Posted October 26, 2016 4:54pm by Yuichi Narisawa
    Yuichi Narisawa
    19,548 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Marguerite Holden
    Marguerite Holden
    6,075 Points

    How do I create a hash with the keys and values here?

    Posted October 24, 2016 9:33pm by Marguerite Holden
    Marguerite Holden
    6,075 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Brian Patterson
    Brian Patterson
    19,588 Points

    So why is this giving me an error?

    Posted April 28, 2016 8:29pm by Brian Patterson
    Brian Patterson
    19,588 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    2 Answers

  • Alexandre Gomes
    Alexandre Gomes
    4,775 Points

    The challenge asks me to modify the method to return a hash with this pair:

    Posted February 7, 2016 1:39pm by Alexandre Gomes
    Alexandre Gomes
    4,775 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    0 Answers

  • Oğulcan Girginc
    Oğulcan Girginc
    24,848 Points

    Modify the "create_shopping_list" method to return a hash with the following keys and values:

    Posted January 24, 2016 10:08pm by Oğulcan Girginc
    Oğulcan Girginc
    24,848 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    2 Answers

  • Cody Mumford
    Cody Mumford
    11,531 Points

    Modify the "create_shopping_list" method to return a hash with the following keys and values:

    Posted January 9, 2016 7:42pm by Cody Mumford
    Cody Mumford
    11,531 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    3 Answers

  • Alphonse Cuccurullo
    Alphonse Cuccurullo
    2,513 Points

    Modify the "create_shopping_list" method to return a hash with the following keys and values:

    Posted December 20, 2015 6:00am by Alphonse Cuccurullo
    Alphonse Cuccurullo
    2,513 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Niki Torres
    Niki Torres
    1,026 Points

    Am I overthinking this challenge with this code?

    Posted September 25, 2015 3:29pm by Niki Torres
    Niki Torres
    1,026 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Daniel Dalrymple
    Daniel Dalrymple
    5,817 Points

    Making a Hash with an Empty Array

    Posted September 5, 2015 3:46am by Daniel Dalrymple
    Daniel Dalrymple
    5,817 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • Daniel Wise
    Daniel Wise
    9,119 Points

    What is wrong with this code? It seem right to me.

    Posted June 16, 2015 5:44am by Daniel Wise
    Daniel Wise
    9,119 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

  • nithish kumar murcherla
    PLUS
    nithish kumar murcherla
    Courses Plus Student 1,023 Points

    unable to understand what i am doing wrong

    Posted April 17, 2015 2:56pm by nithish kumar murcherla
    nithish kumar murcherla
    Courses Plus Student 1,023 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    2 Answers

  • Caleb Kleveter
    Caleb Kleveter
    37,862 Points

    Method returns with hashes and arrays.

    Posted March 18, 2015 12:16am by Caleb Kleveter
    Caleb Kleveter
    37,862 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    2 Answers

  • Brant Faulkner
    Brant Faulkner
    7,921 Points

    [solved] Build a Grocery List Program challenge.

    Posted January 26, 2015 8:30pm by Brant Faulkner
    Brant Faulkner
    7,921 Points
    • Ruby
    • Ruby Collections
    • Build a Grocery List Program
    • Method Returns with Hashes and Arrays

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord