Камень, ножницы, бумага на JavaScript

Aug 14, 2013 23:15


var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
if (computerChoice < 0.34) {
computerChoice = "rock";
} else if(computerChoice <= 0.67) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
}
var compare = function (choice1, choice2)
{
  if (choice1 === choice2)
  {
      return "The ( Read more... )

Leave a comment

Comments 1

myspase August 16 2013, 14:23:48 UTC
Пропиши команду "ю-зе-фа"

Reply


Leave a comment

Up