I am working on creating different meal menus in this restaurant I have created using JavaScript. I was on my first couple lines of added code when I came across this ReferenceError saying that prompt is undefined. If you need to see full context you can reference the original code here https://repl.it/@qwerty_________/Welcome-to-the-Drivethrough and the code I'm working on here https://repl.it/@qwerty_________/DullFreeMisrac. The official error is right here.
ReferenceError: prompt is not defined
at evalmachine.<anonymous>:2:12
at Script.runInContext (vm.js:74:29)
at Object.runInContext (vm.js:182:6)
at evaluate (/run_dir/repl.js:133:14)
at ReadStream.<anonymous> (/run_dir/repl.js:116:5)
at ReadStream.emit (events.js:180:13)
at addChunk (_stream_readable.js:274:12)
at readableAddChunk (_stream_readable.js:261:11)
at ReadStream.Readable.push (_stream_readable.js:218:10)
at fs.read (fs.js:2124:12)
This is on JavaScript. I have already tried changing it to window.prompt rather than just prompt and it said that window was undefined.
var nam = prompt("Hi, Welcome to the Drivethrough!! What is your name?")
var mprice = 4
var bprice = 8
var cprice = 6
var fprice = 2
var oprice = 3
var fmprice = 5
var gprice = 0
var price = 0
var fcmprice = 10
var cmprice = 4
var kkkprice = 9
var dddprice = 10
var mmmprice = 12
var icprice = 6
var resprice = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
var superprice = 1
I was expecting it to bring up the popup box asking me my name and then me select the breakfast menu to test out chocolate milk, but it instead brought up the error code telling me that the prompt was undefined.
Thank you so much for taking a look at my question. :)