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 The Variable Challenge

Nehasree Kolli
Nehasree Kolli
7,651 Points

prompt messages are not displaying

var name = prompt(Enter your desired name?); var place = prompt(Enter your desired place?); var animal = prompt(Enter your desired animal?); alert( You are done!!!! Wait to see result......); var story = name + " went to " + place + " along with " + animal; document.write (story);

2 Answers

Steven Parker
Steven Parker
231,275 Points

It's hard to be sure, since you did not blockquote your code markup could be eating some of the symbols.

:point_right: But it looks like you forgot to put quotes around your strings in the prompt and alerts.

It works if quotes are added:

var name = prompt("Enter your desired name ?");
var place = prompt("Enter your desired place ?");
var animal = prompt("Enter your desired animal ?");
alert("You are done!!!! Wait to see result.......");
var story = name + " went to " + place + " along with " + animal;
document.write(story);
Nehasree Kolli
Nehasree Kolli
7,651 Points

Oh...!!! Did a silly mistake. Thanks Steven.