Seems like the prompt() is not longer working anymore?


#1

when i use prompt() , it give me the result like this:
/home/ccuser/workspace/javascript_101_Unit_3/rockPaperScissors.js:2
var userInput = prompt(‘Choose Rock, Paper, or Scissors?’);
^

ReferenceError: prompt is not defined
at getUserChoice (/home/ccuser/workspace/javascript_101_Unit_3/rockPaperScissors.js:2:19)
at playGame (/home/ccuser/workspace/javascript_101_Unit_3/rockPaperScissors.js:56:20)
at Object. (/home/ccuser/workspace/javascript_101_Unit_3/rockPaperScissors.js:63:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions…js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:427:7)

how come, is there any alternatives?


#2

please post your full code


#3

I just copied the code from others and pasted on the javascript but it is not working


#4

i put your code in a bin, and it runs fine? Press the run button in top right to execute code


#5

prompt(“some string”) seems to be a common issue with Codecademy’s site. I have the same problem, and I learned from looking it up that it’s all over the fora here, so maybe prompt() with this kind of interactive IDE is just funky.

I’ve started copying my code to other sites to check out the prompt and then bring it back to Codecademy and comment out the lines with prompt().