Chifiumi
Random numberunknown
javascript
4 years ago
473 B
23
Indexable
'use strict'; var player, random, computer; // demandez à l'utilisateur son choix (pierre, feuille ou ciseaux) player = window.prompt('Choisissez pierre feuille ou ciseaux'); // modifier la casse en minusule player = player.toLowerCase(); random = Math.round(Math.random() * (3 - 1) + 1); if( random == 1){ computer= "pierre" }else if( random ==2){ computer= "feuille" }else{ computer= "ciseaux" } document.write(computer)
Editor is loading...