-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
I got reminded in nodeschool/discussions#700 that sometimes the problem occurs that people don't see the difference in their output. uppercase/lowercase etc. It might be good to check something like:
function normalise(string) {
return string.replace(/\.|\!|\?|\s|/g, "").toLowerCase()
}
function isProbablyTypo(expectedAnswer, answer) {
return normalise(expectedAnswer) === normalise(answer)
}
if (isProbablyTypo(expectedAnswer, answer)) {
console.log("Looks like you did the right thing but maybe you had a typo in there. We are a little picky to make sure that you understood the question. Maybe you want to check for typos?")
}
Metadata
Metadata
Assignees
Labels
No labels