Bummer! You have been redirected as the page you requested could not be found.

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 Creating Object Literals

What Am I doing wrong here? The system won't tell.

Please help

object.js
player1.play();
const player1 = {
    name: 'Ally',
  color: 'white',
  isTurn: true,
}

4 Answers

John Lack-Wilson
John Lack-Wilson
8,181 Points

Hi Brian, you're not too far off, the problem is that you are calling the play function. The challenge is asking you to add an empty method to the player1 object literal. So what you need to do is add a method (i.e. function) called play inside the player1 object.

Ok so it would be something like this??

const player = { name : ‘ally’, color : ‘white’, isTurn : true, play : function(){

} }

So that didn’t work either and treehouse keeps having me reload the challenge.. I don’t know what’s going on :-/

John Lack-Wilson
John Lack-Wilson
8,181 Points

Treehouse's challenges have been having problems today, best thing to do is to report it to them

ok I sent an email to treehouse already. I'll just take a break for today