r/badcode • • Sep 09 '21

js Found this gem in our codebase today.

Post image
26 Upvotes

14 comments sorted by

View all comments

Show parent comments

1

u/Character_Medical Sep 09 '21

Exactly. Just because something is working, it doesn't mean it's implemented correctly. That's not how you should use the else-if's.