Review Algorithmic Thinking by Building a Dice Game - Step 1

Tell us what’s happening:

guys i have a problem with the ruleContainer variable, it keeps saying me " You should assign your .rules-container element to rulesContainer" but i already did that, idk what to do here

Your code so far

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

/* file: styles.css */

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

const listOfAllDice = document.querySelectorAll(".die");
const scoreInputs = document.querySelectorAll("#score-options input")
const scoreSpans = document.querySelectorAll("#score-options span")
const roundElement = document.getElementById("current-round")
const rollsElement = document.getElementById("current-round-rolls")
const totalScoreElement =  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.querySelectorAll(".rules-container")


const isModalShowing = false

const diceValuesArr = []

const rolls = 0
const score = 0
const round = 0


// 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/128.0.0.0 Safari/537.36

Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 1

Pretty close.

const listOfAllDice = document.querySelectorAll(".die");

This is similar but there are many .die elements, correct?
How many .rules-container are there?

Thanks bro, I didn’t notice that there was only one .rule-container

1 Like

One container to rule them all.