Review Algorithmic Thinking by Building a Dice Game - Step 1

Tell us what’s happening:

It keeps telling me to assign my .die elements to the listOfAllDice. Im pretty sure that I’ve done that and I don’t know what else I can do.

Your code so far

<!-- file: index.html -->

/* file: script.js */
// User Editable Region

const listOfAllDice = document.querySelectorAll('.die');
const score = document.getElementById('score-options');
const scoreInputs = score.getElementsByTagName('input');
const scoreSpans = score.getElementsByTagName('span');
const roundElement = document.getElementById('current-round');
const rollsElement = document.getElementById('current-round-rolls');
const totalScore = document.getElementById('total-score');
const scoreHistory = document.getElementById('score-history');
const rollDiceBtn = document.getElementById('roll-dice-btn');
const keepScoreBtn = document.getElementById('keep-score-btn');
const rulesBtn = document.getElementById('rules-btn');
const rulesContainer = document.querySelector('.rules-container');

let isModalShowing  = false;
let diceValuesArr = [];
let rolls = 0;
let score = 0;
let total = 0;
let round = 1;

// User Editable Region
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0

Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 1

If you take a look at the console, there’s error displayed:

SyntaxError: unknown: Identifier 'score' has already been declared. (17:4)

  15 | let diceValuesArr = [];
  16 | let rolls = 0;
> 17 | let score = 0;
     |     ^
  18 | let total = 0;
  19 | let round = 1;
  20 |

Thank you very much that fixed it