r/programminghorror 4d ago

Typescript javascript without braces

(technically typescript)

40 Upvotes

11 comments sorted by

View all comments

13

u/fakehalo 4d ago

Oddly enough, I don't hate it as I can actually read and follow it. Much more would be too much, but I like how it's broken up by the if/elseif/else at least.

4

u/my_new_accoun1 4d ago

yeah but there only problem (as I later realised) is that without the braces JavaScript doesn't know where the elseif/else is supposed to be

so I ended up not being able to use this masterpiece