Review Algorithmic Thinking by Building a Dice Game - Step 5

Tell us what’s happening:

Someone please explain this to me like I’m 5. Because I don’t get the adult explanation.

Your code so far

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

/* file: styles.css */

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

const updateStats = () => {
  for (i = 0; i < 3; i++) {
    rolls++;
  }
  for (i = 1; i < 5; i++) {
    round++
  }
  currentRoundRolls.textContent = `Rolls: ${rolls}`;
  currentRound.textContent = `Round: ${round}`;
};

rollDiceBtn.addEventListener("click", () => {
  if (rolls === 3) {
    alert("You have made three rolls this round. Please select a score.");
  } else {
    rolls++;
    rollDice();
    
  }
});

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 5

They just want you to put the rolls in the textContent of the respective element and the round in the textContent of its respective element. The end.
(It is literally two lines of code)

ps. Don’t add any text around them or anything. Just the values.

Ah, I see. Thank you.

1 Like