Created
June 23, 2022 08:58
-
-
Save FKasa/7e393a1e07e5714a3625db80ed53c453 to your computer and use it in GitHub Desktop.
Rock, paper, scissors - show all combinations and outcomes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let row = '' | |
let res = ['tied','won','lost'] | |
let a = ['🪨','📃','✂️'] | |
for(let i=0;i<3;i++) | |
for(let j=0;j<3;j++) | |
console.log(`${a[i]} vs ${a[j]} = Player 1 ${res[(((i-j)%3)+3)%3]}!`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment