Review Algorithmic Thinking by Building a Dice Game - Step 3

Tell us what’s happening:

I think this exercise is bugged. I compared my code with step 4 and I got the code right.

Your code so far

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

/* file: styles.css */

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

 const rollDice = () => {
     diceValuesArr = [];

  for(let i = 0; i < 5; i++) {
    const random = Math.floor(Math.random() * 6) + 1;
    diceValuesArr.push(random);
    };
  

  listOfAllDice.forEach((dice, index) => {
    dice.textContent = diceValuesArr[index];
    });
 };

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 OPR/118.0.0.0

Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 3

Why is nothing happening when you click the rollDiceBtn? You might be missing something.

Build out the logic such that clicking on the rollDiceBtn generates five random numbers between 1 and 6 inclusive…