i'm a novice in this world...so trying to begin, I started with an online tutorial. The exercise it's simple, but i can´t get the "empate" text on screen if the condition exists. Can you help me to know whats wrong?:
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 (usuarioElige,computadoraElige) {
if (usuarioElige === computadoraElige) {
return "¡Es un empate!";
}
};
comparar().