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 Adding New Graphics

Does the Adding New Graphics in the JS Introduction when changing the platforms.

For example: Option 1: platforms.create(150, 250, 'platform_2'); Option 2: platforms.create(650, 300, 'platform_1.png');

Which is the correct one? Sorry if this question has already been asked...

1 Answer

Steven Parker
Steven Parker
231,236 Points

I wouldn't expect to see a filename (with a ".png" extension) in a "create" call, and neither of these names are used in the video to identify images. The video shows "platform" and "platform2" as the two images.

Otherwise, your two options place images in different locations on the screen. You haven't shared any criteria to help determine which location might be more "correct" than another.

Thank you!