Skip to content
Discussion options

You must be logged in to vote

Hi @rbruno1, you can easily get rid of the whitespace at the start and end of a string with the JavaScript trim function. Detecting a missing letter is probably going to be trickier. You could look at using regular expressions. One fairly simple thing you could do with regular expressions is remove any non-alphabetic characters from the response (assuming that the response should just be letters), which will catch typos containing numbers, punctuation etc.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rbruno1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants