DEV Community

E Meier
E Meier

Posted on

Mark The Words Project

The final project in my series of projects this semester was to create an application called "Mark the Words". When using this application, users can select and check specific words in a body of text to see if they are one of the correct answers in the given list. The following image is the current state of our project. It is not finished, but the basic functionality is complete where users can select/unselect specific words and check if they are correct or not.
Current State of Project

The code individually wraps words from the sample text so we are essentially able to have each word as an individual element that we can check later.
Ability to Click Specific Words

One of the main issues that we came across (and still having a bit of difficulty with) is the accuracy of checking the specific words. To be more specific, when we selected words that may have additional characters attached in the span like a period or comma, it would mark the word as incorrect because the word in the correct answers did not include the character. We overcame the first issue by utilizing the '.replace' line of code shown in the following image.
Ability to Check Answer Without Unwanted Characters

Looking Forward

While this project is not yet complete, I am personally very happy with the progress our group has made. What is left is working out some additional technical issues with checking the words, aesthetic tweaks, disabling the ability to check answers after the first attempt, scoring, etc. Overall, this project has been my favorite to work on so far!

References

Reference for removing unwanted characters while checking answers

GitHub Link

Github Repo

Top comments (0)