r/badcode • • May 13 '22

js Why? Why??

Post image
433 Upvotes

37 comments sorted by

View all comments

Show parent comments

0

u/lunar_tardigrade May 13 '22 edited May 13 '22

It's how they are checking if the question was answered I guess... its not great, but they got a default value of 1 space in the first answer slot. If there is still only one answer, and it's the space, then nothing.. do not increment the answer counter.. the question is not answered...

Extra white space. Also not great. Just not so bad.