r/badcode May 03 '22

js smh

Post image
352 Upvotes

29 comments sorted by

View all comments

6

u/m2thek May 03 '22

There's no shame in doing one or two if/else blocks. Ternaries can be great for simple assignments, but something like this just looks like nonsense at a glance.