Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Object-Oriented JavaScript: Challenge Rendering the Game Rendering the Spaces, Board, and Tokens Solution

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 90,705 Points

Help with the render methods

Just a couple of quick questions about the last 3 instruction stages...

Firstly, just asking because I'm not sure if we're supposed to bed seeing the space and token objects on the screen now? My code has been updated to the solution but all I'm seeing right now is the #play-area.

Also, we had an instruction to create a getter method for htmlToken() but no solution provided for it. Is that relevant?

    get htmlToken() {
        return token;
    }

Thanks all. :)

1 Answer

You need to use the "getElementById" here to identify the #id in HTML.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 90,705 Points

Thanks Aidan,

In the end, I worked out that the rendering needs to bed called in the startGame() method later on. Thanks for your response. :)