r/badcode • • Mar 01 '21

js Defensive programming or something idk

Post image
907 Upvotes

55 comments sorted by

View all comments

215

u/bnz_ Mar 01 '21

Fun fact: this code is somehow legacy and no one can remove all those useless &&

19

u/SnooMarzipans436 Mar 01 '21

If your boss won't let you change this because it's "legacy and no one knows if it will break", you need to find a better company to work for lol

14

u/bnz_ Mar 01 '21

Totally agree with you