Inspiration To make an interactive rock paper scissors game

What it does takes input through prompt and competes with the ciomp

How we built it in javascript and with the help of Math.random

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for Rock Paper Scissor

Built With

Share this project:

Updates

posted an update

here is the interactive javascript code

var user=prompt("Enter :"); var arr=['Rock','Paper','Scissor'];

var comp=arr[Math.ceil(Math.random()*3)];

var result = user===comp ? "tied" : user ==="Rock" && comp ==="Scissor" ?"User Wins" : user ==="Paper" && comp === "Rock" ?"User Wins" : user ==="Scissor" && comp === "Paper" ? "User Wins" : "Computer Wins";

alert("User Value : "+user+" V/S Computer Value : "+comp); alert(result);

Log in or sign up for Devpost to join the conversation.