Learn Intermediate Algorithmic Thinking by Building a Dice Game - Step 40

Tell us what’s happening:

Apparently do not understand the problem and need help with syntax. My error says “You should assign count to the highestCount.”

Your code so far

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

/* file: styles.css */

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

  for (const num of arr) {
    const count = counts[num];
if (count >=3 && count > highestCount){
  count = highestCount;
}
  }

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Learn Intermediate Algorithmic Thinking by Building a Dice Game - Step 40

Hi @marciannimal

If so, assign count to the highestCount variable.

You are assigning in the wrong order.

Happy coding

1 Like

your issue is here

your assignment is wrong

you have it backwards.

the directions say to assign count to the highestCount variable.

but you are doing the opposite

once you fix that, then it will pass

1 Like

aaaaarrrrgh! Thank you.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.