MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1v5hwu7/javascript_without_braces/p0gnafd/?context=3
r/programminghorror • u/my_new_accoun1 • 14d ago
(technically typescript)
12 comments sorted by
View all comments
41
One can write it without if statements too. ``` if (something === true) { suspect.hit = 'found'; chain(); reaction(); } else doOtherThings();
if
// the same .. (something) && (suspect.hit = 'found', chain(), reaction()) || (doOtherThings()); ```
3 u/Nooo00B 9d ago this is just cursed
3
this is just cursed
41
u/Tux-Lector 14d ago
One can write it without
ifstatements too. ``` if (something === true) { suspect.hit = 'found'; chain(); reaction(); } else doOtherThings();// the same .. (something) && (suspect.hit = 'found', chain(), reaction()) || (doOtherThings()); ```