Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDan Muscat
1,803 Pointswhy is the following code not passing grocery_item.has_value?("Bread") grocery_item.store("food", "true")
why is the following code not passing
grocery_item.has_value?("Bread")
grocery_item.store("food", "true")
grocery_item = { "item" => "Bread", "quantity" => 1, "brand" => "Treehouse Bread Company" }
1 Answer
Dan Muscat
1,803 Pointsfigure it out... true value is not a string..
grocery_item.has_value?("Bread")
grocery_item.store("food", true)
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsHey Dan, Glad you figured it out! :)
You can mark your own answers as "Best Answer." This will let others know that your question has been successfully resolved.
Keep Coding!