Review Algorithmic Thinking by Building a Dice Game - Step 3

Tell us what’s happening:

" When your rollDiceBtn is clicked, your diceValuesArr array should contain five elements. "

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 randomDice = Math.floor(Math.random() * 6) + 1;
    diceValuesArr.push(randomDice);
  };

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

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0

Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 3

hello!

I see you posted some code and a hint message. How can we help you move forward?
(for eg. have you tried to click the roll button as the Hint mentions it? Did it work for you? What do you think is the problem there?)

It does not let me through the code, and it is good, and the przysick from “Roll” does not work, nothing happens when I click.

you are missing to add the logic that connect the function you have written to the button click