Hello folks,
this appears to be my first public appearance in CodeCademy community.
Some changes were made to the text of the original paragraph and extended functionality:
Search on the badWord now collects all of the IDs in the storyWords array
The whole text of storyWords array is now divided into small ones depending on
Forks for Grammar Checker in JavaScript can be seen below:
Codecademy workspace:
https://www.codecademy.com/workspaces/653786699cf7259a423c2a79
Gist:
GrammarChecker.js
let story =
'Last weekend, I took literally the most freaking beautifull bike ride of my life. The route is called "The 9W to Nyack" and it stretches all the way from Riverside Park in Manhattan to South Nyack, New Jersey. It\'s really an adventure from beginning to end! It is a 48 mile loop and it literally took me an entire day. I stopped at Riverbank State Park to take some artsy photos. It was a short stop, though, because I had a freaking long way to go. After a quick photo op at the very popular Little Red Lighthouse I began my trek across the George Washington Bridge into New Jersey. The GW is a breathtaking 4,760 feet long! I was already very freaking tired by the time I got to the other side. An hour later, I freaking reached Greenbrook Nature Sanctuary, an extremely beautifull park along the coast of the Hudson. Something that was very surprising to me was that near the end of the route you literally freaking cross back into New York! At this point, you are very close to the end.';
let storyWords = story.split(" ");
const unnecessaryWord = "literally";
const misspelledWord = "beautifull";
const fixedWord = "beautiful";
const badWord = "freaking";
const goodWord = "really";
const shortWord = "stunning";
This file has been truncated. show original
Any feedback is appreciated.
Thanks in advance!
Regards.