Skip to content

Instantly share code, notes, and snippets.

@FKasa
Created June 23, 2022 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FKasa/7e393a1e07e5714a3625db80ed53c453 to your computer and use it in GitHub Desktop.
Save FKasa/7e393a1e07e5714a3625db80ed53c453 to your computer and use it in GitHub Desktop.
Rock, paper, scissors - show all combinations and outcomes
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