Skip to content

Instantly share code, notes, and snippets.

@Cst2989
Created October 22, 2021 10:46
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/11075e905fcaf22f95fbfda6228c7b9a to your computer and use it in GitHub Desktop.
Save Cst2989/11075e905fcaf22f95fbfda6228c7b9a to your computer and use it in GitHub Desktop.
finished bowling score
export const bowlingScore = (inputRolls) => {
if (inputRolls.length < 20 || inputRolls.length > 21 || inputRolls.some(roll => roll < 0)) {
return 'Invalid rolls input'
}
const arrayOfRolls = listToMatrix(inputRolls);
return totalScore(arrayOfRolls);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment