In the script.js file you will find the whole of Chapter 1 of Dracula by Bram Stoker.
To complete this challenge you should count the number of times a word appears in the chapter of Dracula.
Below is an example of how the result should be printed to the console.
For example the input:
"You and me and You"
would produce
{ You: 2, and: 2, me: 1}To complete this exercise you should understand
- Strings and string manipulation
- Loops or
forEach - Comparison inside
ifstatements
In Visual Studio you can press F5. Alternatively you can use the terminal and write node script.js when you're in the correct file.
-
Remove all of the punctuation (e.g. ".", ",", "!", "?") to tidy up the results
-
Ignore the case of the words to find more unique words. e.g. (A === a, Hello === hello)
-
Order the results to find out which word is the most common in the chapter