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 trial

JavaScript JavaScript Basics (Retired) Storing and Tracking Information with Variables Combining Strings

Arno Featherstone
Arno Featherstone
206 Points

for first challenge, where and when do i put quote marks around my name?

var firstName = prompt("What is your name?");

i've tried several ways of doing this, the response is "Bummer, you need to put quote marks around your name"....where do i do this? nothing i've tried works

script.js
var firstName = prompt("What is your name?");
index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>

2 Answers

Tobias Edwards
Tobias Edwards
14,458 Points

It seems you've deleted your code to pass the first 2 challenges.

With Treehouse, in order to proceed, all challenges must pass in the end. So you'll just need to re-add the code about variables for your first and second name.

var firstName = "Tobias";    // to pass first challenge
var secondName = "Edwards";    // to pass second challenge
// code to pass third challenge
Arno Featherstone
Arno Featherstone
206 Points

actually stuck on first challenge...i now passed it, i don't know what i did wrong because it seemed like i tried this now-complete option before and failed. thanks for your help!

Tobias Edwards
Tobias Edwards
14,458 Points

No problem, let me know if you have any other problems :) But, be sure to mark an answer as your 'best answer' as this will let everyone else know that your question has been resolved. Kinds Regards, Tobias