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 Introducing JavaScript Finishing the Game Final Code Challenge

Mikias Wondyfraw
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Mikias Wondyfraw
Full Stack JavaScript Techdegree Graduate 14,312 Points

Hi! I have added two stars to the screen, however, when I clicked on check work. It did register it correctly.

I wanted to add stars to the empty platform, but I didn't know how to do it. It would be great to go over it.

1 Answer

Steven Parker
Steven Parker
231,269 Points

You forgot to show your code, so where did you put the stars that passed the challenge?

The first two arguments to the starCreate function are the x and y coordinates of the upper-left corner of where the star will go, and you can use the stars already there as a reference. For example, you might place a star at the same x-position as the one already farthest right (425) but at the same level as the lowest one (200):

    starCreate(425, 200, 'star');

Then you could add the next one to the same level but a bit further to the right.