ReferenceError: prompt is not defined


#1


Prompt exercise


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?");


#2

@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


#3

@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


#4

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