Text Analyzer Exercise
This excerise includes:
- Array Manipulation
- String Manipulation
- Converting between data types
- Using objects as function parameters
Build a tool to analyze text as you type it into a textarea.
You will need to determine the following things about the text:
- How many times each vowel has been used (a, e, i, o, u)
- How many times each punctuation mark has been used (. , ? !)
- The total number of characters
- The total number of words
- The longest word
- The shortest word
- The last three words
Every time a keyup event happens, create an object. Then replace all of the values in this object with the correct results.
Hint: It is probably easiest to create a new result object on every keypress.
Finally, create a function which can render this object onto the page inside of the div with the id "results".