buguja / juego

Piedra papel o tijera con JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Juego de Piedra, papel o tijera con JS

Funcion para generar un número random:

function getRandomInt(min,max){
    return Math.floor(Math.random()*(max-min+1)+min)
}

Esto crea un número random entre el 1 y el 3:

Math.floor(Math.random() * 3) + 1;

Operadores lógicos:

and: &&
or: ||
not: !

About

Piedra papel o tijera con JS


Languages

Language:JavaScript 74.2%Language:HTML 15.1%Language:CSS 10.7%