Skip to content

Instantly share code, notes, and snippets.

@Cst2989
Last active October 22, 2021 10:00
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 Cst2989/a1598264fb9432c407d69952fe29d6d3 to your computer and use it in GitHub Desktop.
Save Cst2989/a1598264fb9432c407d69952fe29d6d3 to your computer and use it in GitHub Desktop.
Calculate frame invalid inputs
const calculateFrame = (firstRoll, secondRoll) => {
const rollSum = firstRoll + secondRoll;
if (rollSum > 10) {
return 'Invalid frame input';
}
return 0;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment