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 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