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

I don't know what's wrong? var answer = prompt("what day is today?")

There comes a window. So i don't know what's wrong

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>

Sorry for posting this off-topic, but I'm helping Treehouse investigate a potential issue with their webserver. Please follow this link and leave a comment saying if you have experienced this webserver issue or not.

https://teamtreehouse.com/forum/attention-treehouse-webserver-issues-please-read

Thank you.

3 Answers

Hi Kelvin,

The challenge is just being picky - it's expecting "What" to be capitalized.

// this fails
var answer = prompt("what day is it?");

// this passes
var answer = prompt("What day is it?");
Abe Layee
Abe Layee
8,378 Points

I belive the question is asking you to store the answer var into the prompt() function like this.

var answer;
prompt("What day is it?");
answer = prompt; 

oh~~Yes Robert. It works right now! So the problem is capitalized!