Skip to content

Instantly share code, notes, and snippets.

@NyaGarcia
Last active October 9, 2019 16:51
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 NyaGarcia/9b39efabb3bc913c953719cc60f28d66 to your computer and use it in GitHub Desktop.
Save NyaGarcia/9b39efabb3bc913c953719cc60f28d66 to your computer and use it in GitHub Desktop.
A function with a complex conditional statement
function checkGameStatus() {
if (
remaining === 0 ||
(remaining === 1 && remainingPlayers === 1) ||
remainingPlayers === 0
) {
quitGame();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment