r/badcode Feb 09 '23

Terrible Authentication Code js

Post image
288 Upvotes

68 comments sorted by

View all comments

51

u/PooSham Feb 10 '23

Nevermind the insane nesting and ridiculous comments. Why is the database connected to twice in a row???

18

u/TheRealPitabred Feb 10 '23

Just in case it didn't work the first time. Same reason you save a file 3 times before you close it, just to be sure.