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 trialPedro Daim
1,192 PointsHi.What am i doing wrong ? I wrote var answer = prompt("What day is it ?");
Javascript Basics.
var answer = prompt("What day is it ?");
<!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>
3 Answers
Grace Kelly
33,990 PointsHi Pedro, these code challenges can be very picky about the input they require. While your code works perfectly, the challenge wants to receive a prompt with "What day is it?" while you have given it a prompt with "What day is it ?". There is a space between your "it" and your "?", simply fix that and the challenge should pass :)
Pedro Daim
1,192 PointsHi guys. I was able to fix it. Thanks Grace it was exactly what you said. Sorry that i didn't explain what i wanted properly . I was still getting the input box to pop up but in the challenge it was outputing as wrong. Thanks all for the help. Cheers. Pedro.
Andreas Anastasiades
2,916 PointsWhat's the issue here? Do you get the dialog?
add
document.write(answer);
To display the given data
sboussacsou
Courses Plus Student 7,450 Pointssboussacsou
Courses Plus Student 7,450 Pointswhat's your message error ?