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 trialIsaac Nsubuga
412 PointsUse the document.write() function to print the contents of the player variable to the page.
var player= "Jasmine"
var player= "Jasmine"
document.write("<h1>jasmine</h1>");
alert(massage);
<!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
Alexander Davison
65,469 PointsYou don't need to make the text an H1
, and you need to use the variable player
.
var player = "Jasmine";
document.write(player);
I hope this helps. ~Alex
If this answered your question, please provide a Best Answer
so that your question is marked as answered. Thanks!
andres garcia
3,113 Pointsok got it. i understand now. thank you Alexander Davison
andres garcia
3,113 Pointsandres garcia
3,113 Pointsdoes not the player need quote? single or double
Alexander Davison
65,469 PointsAlexander Davison
65,469 Pointsplayer
does not need quotes. When you reference to variables, you don't use quotes.You only use quotes with strings.