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.

Anthony Lakin
11,687 PointsPrompt box does not appear.
The prompt box does not pop up even when I am following Dave's code. Could this be a browser setting? I am using Chrome.
4 Answers

usmantahir
6,583 Pointsyour code have an error at where the </p> tag is close in a message variable. Add a ( " ) after closig </p> tag and before ( ; ) . its a correct formate. var input = prompt("Please type a number"); var topNumber = parseInt(input); var randomNumber = Math.floor(Math.random() * topNumber) + 1; var message = "<p>" + randomNumber + " is a number between 1 and " + topNumber + ".</p>"; document.write(message);

Aryan B
1,638 PointsAs inside the quotes space matters , so you can simply add ("Your statement "); and it will work. I think using HTML space tag makes it little harder to pick out errors.

Anthony Lakin
11,687 PointsThank you for your help.

Aryan B
1,638 PointsCan you show me your code, so I can see how you are doing it

Anthony Lakin
11,687 Pointsvar input = prompt("Please type a number"); var topNumber = parseInt(input); var randomNumber = Math.floor(Math.random() * topNumber) + 1; var message = "<p>" + randomNumber + " is a number between 1 and " + topNumber + ".</p>; document.write(message);
Anthony Lakin
11,687 PointsAnthony Lakin
11,687 PointsThank you for your help.