this post was submitted on 11 Dec 2023
32 points (79.6% liked)

JavaScript

1982 readers
1 users here now

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] coloredgrayscale@programming.dev 10 points 11 months ago (1 children)

pleasure of refactoring this mess took half an hour to understand

If you can use any of the jetBrains IDE it can rewrite it to if/else with a few clicks (or [alt] +[return])

[โ€“] kassuro@feddit.de 2 points 11 months ago

Ah that would be helpful. Gotta try that the next time I encounter such a monstrosity.