Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion 01week/rockPaperScissors.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ const rl = readline.createInterface({


function rockPaperScissors(hand1, hand2) {

if (hand1 === hand2){
"tie"
}else if((hand1 === 'rock' && hand2 === 'scissors') || (hand1 === 'paper' && hand2 === 'rock') || (hand1 === 'scissors' && hand2 === 'paper')){
"Hand 1 wins"
}else{
"Hand 2 wins"
};


// Write code here

}

Expand Down