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 trialEnzie Riddle
Front End Web Development Techdegree Graduate 19,278 PointsEach prompt dialog box opens twice! HELP
Each prompt() dialog box opens twice. I followed some of the questions people have asked before, but it doesn't appear that the story.js source is repeated in the HTML file. HELP.
4 Answers
james south
Front End Web Development Techdegree Graduate 33,271 Pointsyou have each prompt written twice, so it opens two each. when you put prompt('enter...') it prompts but does not store the input. on the following line you put var noun = prompt('enter...') it prompts again, but that input would be stored in the noun variable.
luke williams
Python Web Development Techdegree Student 467 Pointsdont worry index.html already called the js file and i didnt realise so it was linked twice
Enzie Riddle
Front End Web Development Techdegree Graduate 19,278 PointsGot it! Thank you!
luke williams
Python Web Development Techdegree Student 467 PointsDo you know why the following code would pop up two prompts? var noun = prompt("please enter a noun"); document.write(noun);
Enzie Riddle
Front End Web Development Techdegree Graduate 19,278 PointsEnzie Riddle
Front End Web Development Techdegree Graduate 19,278 PointsOkay. So do I only need to write var noun = prompt('enter') ???