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 trial

JavaScript Object-Oriented JavaScript Object Basics Filling Out the Play Method

Rhonda Goolsby
Rhonda Goolsby
6,992 Points

How can the if statement be empty?

play: function(){ if(){ player1.play(); }

const player1 = {
    name: 'Ashley',
    color: 'purple',
    isTurn: true,
    play: function(){

1 Answer

Alex Koumparos
Alex Koumparos
Python Development Techdegree Student 36,887 Points

Hi Rhonda,

The question is asking for the body of the if statement to be empty. The conditional (the parentheses) should still be filled in as normal.

The question gives you a hint about what it is expecting inside the parentheses (and depending on how you fill it in, the bummer message might give you another hint).

You'll fill in the body of the if statement in the next challenge step.

Hope that helps,