Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Use `for in` to Loop Through an Object's Properties 4:31
- Loop Through an Object's Properties 2 objectives
- Useful JavaScript Object Methods
- Store Objects in Arrays 3:45
- Create an Array of Objects 2 objectives
- Build an Object Challenge 1:17
- Build an Object Challenge – One Solution 3:09
- Display an Array of Objects on the Page – One Solution 7:14
- Review `for in` and Arrays of Objects 6 questions

- 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
Arrays let you group values to build complex data structures. With an array, you store a collection of elements you can access by their position (or index). Objects take that concept further by providing a way to structure related data that's easy to read and retrieve using key/value pairs. It's common to combine the two by creating an array of objects.
Resources
Array of objects code snippet:
const questions = [
{ question: 'How many planets are in the Solar System?', answer: '8' },
{ question: 'How many continents are there?', answer: '7' },
{ question: 'How many legs does an insect have?', answer: '6' },
{ question: 'What year was JavaScript created?', answer: '1995' }
];
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Samuel Kleos
Front End Web Development Techdegree Student 13,728 Points2 Answers
-
Micah Angelica Baguio
3,409 Points1 Answer
-
PLUS
Spencer Renfro
Courses Plus Student 11,133 Points1 Answer
-
karan Badhwar
Web Development Techdegree Graduate 18,135 Points1 Answer
-
Austin Schneider
4,919 Points2 Answers
-
Embie Wong
3,180 Points1 Answer
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