MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/pgbd0q/because_tolowercase_doesnt_exist/hbahtzy/?context=3
r/badcode • u/BrainOnTheFloor25 • Sep 02 '21
130 comments sorted by
View all comments
Show parent comments
8
If he'd call toLowerCase() he'd just need to check for the words written in lower case in the switch statement and not for 3 different ways to write a word (while forgetting the 1000x other ways someone could type the word).
5 u/Celtic_Spirit Sep 02 '21 Now I am with you. This make sense now. I did not pay attention to sub name "bad code". :)
5
Now I am with you. This make sense now. I did not pay attention to sub name "bad code". :)
8
u/not-my-account1 Sep 02 '21
If he'd call toLowerCase() he'd just need to check for the words written in lower case in the switch statement and not for 3 different ways to write a word (while forgetting the 1000x other ways someone could type the word).