Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
It's time to put your knowledge of JavaScript Objects to the test. In this practice challenge, you'll use JavaScript loops, arrays, and objects to create a script that builds a pet directory, then displays it on the page.
This is a two-part challenge!
We'll work through this code challenge over the course of the next few videos. Don't worry if some things are confusing at first - we'll walk through the solutions each step of the way!
This video introduces part one of the coding challenge.
Part One - Creating a Data Structure
In part one, we'll create a data structure for the information you'll want to display in the browser. Your challenge is to create an array of objects containing information about different pets. You don't need to worry about making anything appear in the browser just yet!
Your workspace will contain a directory full of pet images to use in this step, so make sure you've looked inside the img
folder to properly reference the file names .
The next video in this sequence will show you one solution to this part of the challenge, and provide you with an example about how the information could be structured.
We'll then move on to introduce part two of the challenge, and look at how we can implement a loop to access the information for each pet object in your array.
Take this challenge one step at a time, and don't worry if you need to step ahead to the solution!
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated 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