Mini Linter: Task 6 - Trouble with logging each overused word count



I am currently stuck on task 6 of the Mini Linter project, the question is below:

Log these items to the console:

* The word count
* The sentence count
* The number of times each overused word appears

You could choose to simply log them one by one or, for a challenge, create a function that logs all of them with some formatting.

I have the first two down but it is the number of times each overused word appears that I just can’t seem to get my head around.

Any guidance would be much appreciated!



What stops you?
Do you for example have the information of how many times they appear? (that was an earlier step)



I can simply use the variables from the previous step but for some reason I was thinking I needed to use another iterator to log them to the console? Rather than 3 separate statements.

If not then all is well :slight_smile:


Ideally you’d create a Map or plain object even, where you store the counts of all the words you’ve already mentioned in your overused words array (or of all words in the whole text)

This is much better because then you can change the words in the array without having to change any other code.

If you have that information in three separate variables, then you will of course have to refer to each of those again to get that information.