Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTim Hare
Full Stack JavaScript Techdegree Student 14,525 Pointsinside the play method, write an empty if statement that checks if its the players turn. use dot notation.
I have no idea what the question is asking me. I have yet to use if statements and I do not know how to use dot notation.
const player1 = {
name: 'Ashley',
color: 'purple',
isTurn: true,
play: function(){
// write code here.
}
}
2 Answers
Steven Parker
231,275 PointsThis is an intermediate-level course, and it has two specific prerequisites: JavaScript Basics and JavaScript Loops, Arrays, and Objects.
You might set this course aside until you have completed both of those, and then come back to this one armed with essential knowledge such as how to use "if" statements.
andren
28,558 PointsIf that is the case then you must not have completed the JavaScript Basics and JavaScript Loops, Arrays and Objects courses.
They are both classified as prerequisite courses for the Object-Oriented JavaScript course. Which means that it is recommended that you complete them before starting the course you are currently on, unless you are already familiar with the concepts thought in those courses.
Also the video that directly precedes this challenge Dot Notation & Bracket Notation does offer a refresher on what dot notation and bracket notation are. So unless you skipped that video you should be familiar with how dot notation works.