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 trialalonzo alvarado
3,387 Pointscreate a variable named "myName" but don't put anything in it yet.
i dont understand what its refering to by "dont put anything in it yet" this was my code:
var message = "myName";
it says i didnt name the variable "myName"
var message = "myName"
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script src="scripts.js"></script>
</body>
</html>
2 Answers
Damien Watson
27,419 PointsSo create a variable called "myName" with nothing in it would be:
var myName = "";
Jonathan Romine
9,344 PointsTry this:
var myName = "Your Name";
alonzo alvarado
3,387 Pointsit worked thank you :D the syntax of javascript is still a little confusing to me... so its
var name of var = "whatever this is called"
alonzo alvarado
3,387 Pointsalonzo alvarado
3,387 PointsOOOOOOOHHHHH!!! so the name of the variable goes before the "="?! thank you so much damien :D
Damien Watson
27,419 PointsDamien Watson
27,419 PointsMost welcome.