Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Basics (Retired) Storing and Tracking Information with Variables Create a variable with a string

i 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';
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
<script src="app.js"></script>

2 Answers

28,526 Points

Your 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
Jason Anders
Treehouse Moderator 145,631 Points

Hi 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 :thumbsup:

Keep coding! :) :dizzy: