ReferenceError: prompt is not defined

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
Prompt exercise

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
I wrote a .js file included the prompt command. But I got a “ReferenceError: prompt is not defined” Error after running it using Node.js. Could you please tell me what causes this error? Or what library is needed.

```

The code is shown below:
prompt(“What’s your name?”);

<do not remove the three backticks above>

@arcsolver04066,
To get in idear of what kind of problem you are encountering…
Do a google search in the knowledge-base of the site stackoverflow.com

== discussions / opinions ==
nodejs "ReferenceError: prompt is not defined site:stackoverflow.com
for instance
http://stackoverflow.com/questions/24291909/prompt-not-defined-using-node-from-command-line

@arcsolver04066,
This Javascript course is presented to you using

  • left-column in which explanation & instructions are presented
  • middle-column in which you will place the required code as asked by the Instructions
  • right-column a redirected display of results generated by your code AFTER
    you have clicked on the submit-button

What you should know
++++ reset of session *****************
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.