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 Capturing Visitor Input and Writing It to the Page

jennifer ray
jennifer ray
7,875 Points

capturing visitor input challenge task 2

I cant see where I have gone wrong with the code:

var answer = prompt('what day is it?');

I get an error message saying "you didn't put 'what day is it' in the prompt box?

scripts.js
var answer = prompt('what day is it?');
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="scripts.js"></script>
</body>
</html>

4 Answers

Don't forget to use the capital "W" at the beginning of your question.

jennifer ray
jennifer ray
7,875 Points

Thank you cant believe I have been looking at that for ages, did I just need the capital W because the answer had to be exactly as it was written in the question?

Yes, I guess it is case sensitive.