title: ReferenceError: prompt is undefined. How would I fix this in JavaScript?
body: <p>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 <a href="https://repl.it/@qwerty_________/Welcome-to-the-Drivethrough" rel="nofollow noreferrer">https://repl.it/@qwerty_________/Welcome-to-the-Drivethrough</a> and the code I'm working on here <a href="https://repl.it/@qwerty_________/DullFreeMisrac" rel="nofollow noreferrer">https://repl.it/@qwerty_________/DullFreeMisrac</a>. 
  The official error is right here.</p>
  
  <pre><code>ReferenceError: prompt is not defined
  at evalmachine.&lt;anonymous&gt;: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.&lt;anonymous&gt; (/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)
  </code></pre>
  
  <p>This is on JavaScript. I have already tried changing it to window.prompt rather than just prompt and it said that window was undefined.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> 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</code></pre>
  </div>
  </div>
  </p>
  
  <p>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. </p>
  
  <p>Thank you so much for taking a look at my question. :) </p>