Review Algorithmic Thinking by Building a Dice Game - Step 2

Hey campers!
Please help me, whyyyy I keep getting the error “When your rulesBtn is clicked, your rulesContainer should be visible?”

My code works on preview, btw.

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

/* file: styles.css */

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

rulesBtn.addEventListener("click", () => {
  rulesBtn.textContent = isModalShowing? "Hide Rules" : "Show Rules";
  rulesContainer.style.display = isModalShowing? "block" : "none";
  isModalShowing = !isModalShowing
})


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36

Challenge Information:

Review Algorithmic Thinking by Building a Dice Game - Step 2

move that inverting variable on the top line. and your code will pass.

2 Likes