You're already doing it right
prompt is a function
prompt() is a function call
prompt("Question") and prompt() open a pop-up where "Question" could give the user a helpful message one what to enter in this pop-up text field.
in This pop-up you have a few 2 options:
Press cancel which results in null being returned.
Or entering something in this case you get a string value of your input returned e.g.
entered 42 -> returned value "42"
entered value rock -> returned value "rock"
So what you need now is a variable to store the returned value and that is already what you're doing:
var userChoice = prompt("Do you choose rock, paper or scissors?");