Rock, paper, scissors JS Project
Start a new git repo for your project. Create a blank HTML document with a script tag. This game is going to be played completely from the console, so don’t worry about putting anything else in there. Your game is going to play against the computer, so begin with a function called computerPlay that will randomly return either ‘Rock’, ‘Paper’ or ‘Scissors’. We’ll use this function in the game to make the computer’s play. Write a function that plays a single round of Rock Paper Scissors. The function should take two parameters - the playerSelection and computerSelection - and then return a string that declares the winner of the round like so: "You Lose! Paper beats Rock" make your function case insensitive (so users can input rock, ROCK, RocK or any other variation)
Important note: you want to return the results of this function call, not console.log() them. To test this function console.log the results:
function playRound(playerSelection, computerSelection) { // your code here! }
const playerSelection = 'rock' const computerSelection = computerPlay() console.log(playRound(playerSelection, computerSelection))