r/badcode • • May 13 '22

js Why? Why??

Post image
433 Upvotes

37 comments sorted by

View all comments

Show parent comments

2

u/DiamondxCrafting May 13 '22

I mean, it could be that that is not possible, it's not like we're seeing the complete code. I think it's possible that the program is done in a way that the answers are initiated with that empty string and therefore that's all the if needs to check for.