Despite my best efforts, I can’t seem to figure out whats wrong! It checks if the player played 6 rounds, and shows a message after 500ms!
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
if (round > 6) {
setTimeout(() => {
alert(`Game Over! Your total score is ${score}`);
}, 500);
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0) Gecko/20100101 Firefox/142.0
Challenge Information:
Review Algorithmic Thinking by Building a Dice Game - Step 11
6, and the counter starts at 1, so after the player plays rounds number 6, when he clicks on the button, it shows the alert with a delay, it actually works ok on the preview!
Your solution works from my end. Please try one of the following steps to move forward.
Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.
or - Try the step in incognito or private mode.
or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.
or - Ensure your browser is up-to-date or try a different browser.