2/9 Syntax Error


What Am I Doing Wrong Here?
- Can Some One Send Me The Right Code?

Here's The JS Code
var userChoice = function()

// It Keeps Saying Oops, try again. There was a problem with your syntax.
// But I Don't Even Know What I'm Doing


You don't want to create a function, you want to ask the user: Do you choose rock, paper or scissors?
You can do so by using a command called prompt. Here's an example:

prompt("What's your name?")

This will give the user a pop up box saying "What's your name?" and ask the user for an input.
If you write something like:

var userName = prompt("What's your name?")

It will ask the user for his/her name, create the variable "userName" and bind their answer to that variable. You can often get an answer to whatever your problem is by pressing the "Stuck? Get a hint!" button.

Hope this helps :smile: