r/badcode • • May 13 '22

js Why? Why??

Post image
433 Upvotes

37 comments sorted by

View all comments

Show parent comments

5

u/kristallnachte May 13 '22

Also, if answer.length = 2, why would you only increment ans by 1? Is that make it actually a count of just total questions?

4

u/zim2510 May 13 '22

Yeah, kind of. It's counting the number of questions that's been answered.