Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Let’s clean up our object instantiation and output and move it out of our class file. Our cookbook will use more than one class so this is a great point to start separating the concerns.
Challenges
Now that we've seen how to get and set an associative array, try adding some new methods around ingredients. Such as:
- Converted to a simple array of ingredient strings
- Converted to just a string of ingredient items
- Return the ingredients formatted in a list
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
György Varga
19,198 Points1 Answer
-
samsor ithnin
3,175 Points1 Answer
-
samsor ithnin
3,175 Points0 Answers
-
samsor ithnin
3,175 Points0 Answers
-
Trần Phúc
2,264 Points3 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up