function diceGame(playerRolls, dealerRoll) {
let match = false
playerRolls.forEach((roll, index) => {
for (let i = index + 1; i < playerRolls.length; i++) {
if (roll + playerRolls[i] === dealerRoll) {
match = true
}
}
});
return match;
}
view raw diceGame.js hosted with ❤ by GitHub