JavaScript JavaScript Basics (Retired) Storing and Tracking Information with Variables The Variable Challenge

Enzie Riddle
Enzie Riddle
Front End Web Development Techdegree Graduate 19,278 Points

Each 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.

https://w.trhou.se/b6ao23180s

4 Answers

james south
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
james south
Front End Web Development Techdegree Graduate 33,254 Points

you 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
PRO
luke williams
Python Web Development Techdegree Student 467 Points

dont worry index.html already called the js file and i didnt realise so it was linked twice

luke williams
PRO
luke williams
Python Web Development Techdegree Student 467 Points

Do you know why the following code would pop up two prompts? var noun = prompt("please enter a noun"); document.write(noun);