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 trialJulian Reta
403 Pointsi created a variable myName but it keeps saying error.its telling me dont put anything in yet.any advise?
its telling me to not put anything in it but not sure what it means by that.
var = "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
stephan garrett
20,822 PointsYou have to declare a variable name first and then put something in it. In this case it's asking not to put anything into the variable yet. The syntax should read something like this: var myName = " ";
mryoung
4,156 PointsI’m sure you already know this, but the equal sign doesn’t mean the same thing as it does in mathematics (this equals that), it’s actually used to assign things.
So if you have var = “myName”
It’s like creating a variable with no label and assigning a string of myName.
You want the name on one side of the equal sign and the value on the other
In this case it’s myName = blank
To create a blank entry just use empty quotes “ “
Var myName = “ “