Tell us what’s happening:
Every test its saying that I’m not passing, I’ve tested myself, and all of the functionality works; these are the tests I’m not passing:
3. When your rulesBtn is clicked, your rulesContainer should be visible.
4. When your rulesBtn is clicked, your rulesBtn should say Hide rules.
6. When your rulesBtn is clicked twice, your rulesContainer should not be visible.
7. When your rulesBtn is clicked twice, your rulesBtn should say Show rules.
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
rulesBtn.addEventListener("click", () => {
if (isModalShowing = !isModalShowing) {
rulesContainer.classList.toggle("rules-container");
rulesBtn.textContent = "Hide rules"
}
else {
rulesContainer.classList.toggle("rules-container");
rulesBtn.textContent = "Show rules"
}
})
// 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/139.0.0.0 Safari/537.36
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 2