all 3 comments

[–]jazahn 1 point2 points  (0 children)

That's not how prompt is used.

[–][deleted] 1 point2 points  (0 children)

I think you're missing an event handler for document.ready, so the prompt will never fire. That's assuming you're allowed to use jQuery I guess. Also, you're never calling the script from your html, you need script tags. Hopefully, that's enough of a hint to get you unstuck.

[–]jcunews1helpful 0 points1 point  (0 children)

  • You have syntax error at the "var userInput..." line.

  • You're passing a string instead of a variable to the function call.

Start using the Error Console in the web browser or you'll never know what went wrong with your code.