How do I get input from the User in the Beginning Javascript Project - 'Rock-Paper-Scissors'? I want to ask the User the question, wait for the input from the user and then proceed rather than hard-coding the userChoice in Javscript

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

Getting user input is not so simple in JavaScript.

It depends whether you’re getting user input using a webpage or using Node.js
(and whether you’re using using synchronous or asynchronous functions for that).

Here’s one Codecademy article about doing user input in Node.js
https://www.codecademy.com/article/getting-user-input-in-node-js