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 trialMathias Szanto
3,256 PointsWhy the answer is "Jasmine" instead of "player" var in this challenge?
Hello, just did this challenge task, and maybe i'm too noob for the moment but, i didn't understand why the answer is "Jasmine".
we should write document.write("player");
instead of document.write("Jasmine");
in this task no?
Even the bummer error talk about the player var !
2 Answers
Louis Otto
23,264 PointsHi Mathias,
You're right in method, except you are writing javascript ("player")
when to access a variable you must not include "", the correct method is javascript document.write(player);
Louis Otto
23,264 PointsIt may simply be a limitation of the design of the tool. It is simply looking for a printed response of "Jasmine" which method you use (of the two available) to print that does not matter as long as it receives the correct output.
Cheers!
Mathias Szanto
3,256 PointsHaha oh ok, thank you :)
Mathias Szanto
3,256 PointsMathias Szanto
3,256 PointsOops yes, Louis :) but i do not understand... why, when i write,
document.write("Jasmine");
the challenge pass?Dave McFarland
Treehouse TeacherDave McFarland
Treehouse TeacherHi,
Thanks for pointing this out Mathias Szanto
I've fixed the Code Challenge so that students HAVE to use the variable. This doesn't pass anymore:
document.write("Jasmine");