Task is to set up the Hide Rules/ShowRules mechanic.What is wrong?
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
document.addEventListener("click",((rulesBtn)=>{
rulesContainer.visibility=true;
if(clickCount%2===1){isModelShowing=true;rulesBtn.textContent="Hide rules"}else{isModelShowing=false;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/142.0.0.0 Safari/537.36 Edg/142.0.0.0
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 2