JavaScript Exercise 5. read error


#1

var usuarioElige = prompt("piedra, papel o tijera?");
var computadoraElige = Math.random();
if (computadoraElige <0,34){
computadoraElige = "piedra";
}else if(computadoraElige <=0.67){
computadoraElige = "papel";
}else{
computadoraElige = "tijera";
}

var comparar = function(eleccion1,eleecion2){
if(eleccion1===eleccion2){
return "¡Es un empate!"
}
}

when I put "save and send code" sends me an error "not you call the function compare".
Anyone knows what's happen?


#2

check , you wrote "eleecion2"

i use this code, and it's OK

var comparar = function (eleccion1, eleccion2)
{
if ( eleccion1===eleccion2 )
{
return ("¡Es un empate!");
}

}