Last active
October 9, 2019 16:51
-
-
Save NyaGarcia/9b39efabb3bc913c953719cc60f28d66 to your computer and use it in GitHub Desktop.
A function with a complex conditional statement
This file contains hidden or 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
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