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 previous four game logic methods.
Ternaries
Check out the JavaScript Syntax Reference or the MDN documentation to learn more about ternaries.
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
Most of these were short methods.
0:00
Let's go through the solutions for
each one.
0:00
We'll start with the mark
method in space.js.
0:03
The purpose of this method was to change
a given space object's token property so
0:06
it's set to the token object
that was dropped into it.
0:11
The token object is
passed in as an argument.
0:15
To update the property value,
it's just this.token = token.
0:18
Pretty easy, right, okay.
0:23
Let's move back to game.js.
0:25
The code for an explanation of the
checkForWin method was provided to you.
0:27
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