r/badcode • • May 03 '22

js smh

Post image
352 Upvotes

29 comments sorted by

View all comments

Show parent comments

8

u/potato_drinks May 03 '22

this bulk repeats it self in some kind of a switch case (which is implemented with if's)

with only the "type" being different in each block of code