Что не так с моим кодом, он все время говорит: "Ты победил! - Решенный
var rock = "rock"; var paper = "paper"; var computerPick = null; var d = Math.random() * 100 var sizzors = "Sizzors"; var pick = prompt("Please pick rock, paper or sizzors", "<Answer here>"); if(pick = "sizzors") { if( d < 33) { computerPick = "sizzors" } else if(d < 66){ computerPick = "rock" } else{ computerPick = "paper" }; if(computerPick = "paper"){ console.log("You Win!(they picked paper)") }else if(computerPick = "rock"){ console.log("You Lost(They picked rock)") }else{ console.log("It was a tie!(They picked sizzors)") }; } else if(pick = "paper"){ if( d < 33) { computerPick = "sizzors" } else if(d < 66){ computerPick = "rock" } else{ computerPick = "paper" }; if(computerPick = "paper"){ console.log("It was a tie!(They picked paper)") }else if(computerPick = "rock"){ console.log("You Won!(They picked rock)") }else{ console.log("You Lost!(They picked sizzors)") }; }else if(pick = "rock"){ if( d < 33) { computerPick = "sizzors" } else if(d < 66){ computerPick = "rock" } else{ computerPick = "paper" }; if(computerPick = "paper"){ console.log("You Lost!(They pickedpaper)") }else if(computerPick = "rock"){ console.log("It was a tie!(They picked rock)") }else{ console.log("You Won!(They picked sizzors)") }; }else{ console.log("You didnt pick rock paper or sizzors!") }
Что я уже пробовал:
Я не могу понять, что с ним не так!