Piedra, papel o tijera


como hago para declarar la variable y que este bien siempre me sale que la


The following statement declares a variable:

var aVar;

It is only declared, and not yet defined. If referred in the program it will not throw a ReferenceError, but may throw an undefined error if queried.

aVar = "some string primitive";

Here we have defined the variable by assigning to it an object reference.

var userChoice = prompt("Do you choose rock, paper or scissors?");

The above is declared and defined in one step. The assignment is the return value (a string or null) of the prompt() function.

Sorry I didn't translate this. Hope you can work through it and make some progress.