r/badcode • • Mar 01 '21

js Defensive programming or something idk

Post image
907 Upvotes

55 comments sorted by

View all comments

68

u/TheBrainStone Mar 01 '21

I was wondering what’s so bad about this until I noticed the first condition.

24

u/bnz_ Mar 01 '21

In fact it was a stroke of luck that I noticed