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 trialLars Johansen
8,333 PointsI think I'm having trouble understanding a question in the code challenge.
I'm not sure what an empty is statement is.
const player1 = {
name: 'Ashley',
color: 'purple',
isTurn: true,
play: function(){
if (player1.isTurn){ }
// write code here.
}
}
1 Answer
Rohald van Merode
Treehouse StaffHey Lars Johansen 👋
Looks like your interpretation of an empty if statement is the same as expected in this challenge, a conditional without a block of code to run when the condition is met 😄
To pass the challenge however you'll want to have a look at the condition that you've created. Instead of specifically targeting the player1
object the challenge is expecting the use of the this
keyword 🙂
Hope this helps!
Lars Johansen
8,333 PointsLars Johansen
8,333 PointsI figured it out, but there wasn't any knowledge about using the 'this' keyword in the video's before the code challenge. You might consider changing the code challenge to reflect this in the future. BR Lars