9 AnswersNew Answer
prompt() is a browser specific function... node.js is designed to run at server side: what is the purpose of user input in this context?
Well, how can I take user input at node.js?
Other synchronous alternatives to readline are readline-sync and prompt-sync https://www.codecademy.com/articles/getting-user-input-in-node-js https://www.npmjs.com/package/readline-sync
Prompt-sync doesn't work
I've just tested prompt-sync with Microsoft Visual Studio and Node.js and it works fine for me. Did you remember to use npm to install the prompt-sync package?
It won't work in the code playground because you are not at the console in the of the code playground's server. You are on a remote connection. All of the exercises in the course can be completed using nothing more than the lessons given.