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

Desmond Dallas
Desmond Dallas
6,985 Points

How do you get the answer if you are stuck on various tasks?

Hi all, Ive only started using Treehouse since yesterday. I have doing a task that i'm stuck on and don't see anyway of getting the answer. Do you know of any feature where it gives you the answer?

6 Answers

Justin Horner
STAFF
Justin Horner
Treehouse Guest Teacher

Ah, so the challenge wants you to make sure the platform that's created on line 24 is pushed 100 pixels down from where it's currently being created.

Looking at line 24, it's important to know that the first two values passed to the create function (300, 100) are in order first for horizontal position and second for vertical position. Knowing that, we know we need to modify the second number to change the vertical position.

Rendering starts at 0 in the top left corner and we add to go down and to the right. So you'll need to change the second value passed to the create function on line 24 to 200.

platforms.create(300, 200, 'platform');

I hope this helps.

Justin Horner
STAFF
Justin Horner
Treehouse Guest Teacher

Hello Desmond,

Welcome to Treehouse! We're glad to have you coding with us :)

I'm not aware of a feature like that. If you need help you can always ask your question here in the community and we'll be happy to help! If you need help for a particular course video, look for the "Get Help" button and that should prompt you to create a new question that will be linked to the video.

I hope this helps. Always feel free to ask us questions.

Happy Coding

Desmond Dallas
Desmond Dallas
6,985 Points

Thank you. It is task 1 of 2 (javascript)

Modify the platform.create command on line 24 to move the platform 100 pixels down, making the new coordinates (300, 200). You can click the Preview button to see what the game looks like. Click the Editor button to return to the code editor.

Desmond Dallas
Desmond Dallas
6,985 Points

All done lol thanks anyway

Jay Padzensky
Jay Padzensky
4,731 Points

I'd also like to add that the Community has a search function to view previous threads to see if any other individuals have posted about it beforehand and you might be able to find an immediate answer supplemented with an explanation. Often, searching the exact string of words of the task's directions, name, or an error message will yield some past results that are helpful.

Thanks for your efforts!

Desmond Dallas
Desmond Dallas
6,985 Points

23 platforms.create(300, 100, 'platform'); 24 platforms.create(400, 450, 'platform'); 25 platforms.create(100, 450, 'platform');