Review Algorithmic Thinking by Building a Dice Game - Step 3

Tell us what’s happening:

Hi, I have no idea how to pass this step. please give me a clue.

When your rollDiceBtn is clicked a second time, your diceValuesArr array should contain only five new elements.

Your code so far

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

/* file: styles.css */

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

  rollDiceBtn.addEventListener('click', () => {
    for(let i = 0; i < 5; i++){
    const random = Math.floor(Math.random() * 6 + 1)
    diceValuesArr.push(random)
    listOfAllDice[i].textContent = random
    }
  })

// User Editable Region

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 3

oh just forget to add empty array at the begining