Thanks for AddSkill team to organise this hackathon. Initially when the problem statement was put on, it looked OMG this is so hard to code in a day, finding out wrong words in a text file and mark them in red colour and display the file contents. Also display the suggestions for each words on hover. Then we got to know, oh there’s already an API for spell check along with correct suggestions. Now it was so easy. ☺
Key things implemented and learned :
- Make API calls using AJAX as well as async-await.
- If a function wants to wait for a result, return it a promise.
- If a custom function makes a call to an async function and wants result from an async function (which returns a promise), pass a reference to that async function call inside a promise, in that custom function.
- Add client side events — mouseover, mouseout.
- Dynamically adding divs to an html element using innerHTML property.
Thanks to the mentors and all AddSkill members and my colleagues for the help. ☺ A healthy, supportive and guiding hackathon like this encourages me to pick up more challenges.