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 trialYisroel stadler
2,910 Pointsi dont know what is wants me to do here
is wants me to use document.write to print player as a function
var player='Jasmine';
document.write(Player)
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script src="app.js"></script>
</body>
</html>
2 Answers
andren
28,558 PointsYour code is mostly correct, the issue is that you spell the player variable with a capital P on your second line. JavaScript is case-sensitive, so Player and player are not considered to be the same name.
If you replace Player with player on your second line then your code will work.
Jason Anders
Treehouse Moderator 145,860 PointsHi Yisroel,
You're very close. All that is wrong is you have a capitalization error in the document.write()
call. In the call you have "Player" with an upper-cased "P" when it should be a lower-cased one. Remember, variable names are lower-case and JavaScript is case-sensitive.
Also, while the above code is correct (with the capitalization correction), it is convention in JS code to end statement lines with a semi-colon. So, while it is not necessary for correct syntax, it is proper to have it, so there is one missing on the second line.
Other than that... Great job
Keep coding! :)