Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Object-Oriented JavaScript: Challenge!
You have completed Object-Oriented JavaScript: Challenge!
Preview
See the solution for the createSpaces() method.
This video doesn't have any notes.
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
First, you can see the documentation
written for this method.
0:00
There's a summary line explaining that
this method would generate a 2D array of
0:04
space objects.
0:08
And then there's a line indicating
that an array will be returned,
0:09
followed by a description of the array.
0:12
The first step in this method is to
create a variable called spaces that
0:14
holds an empty array.
0:19
This is the variable that will
eventually be returned from the method.
0:20
After we create the variable,
0:24
we can go through the business
of populating the array.
0:26
We know that the returned
array should be a 2D array.
0:29
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