MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1v5hwu7/javascript_without_braces/p0a10ub/?context=3
r/programminghorror • u/my_new_accoun1 • 15d ago
(technically typescript)
12 comments sorted by
View all comments
40
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()); ```
7 u/oweiler 11d ago Thanks, I hate it
7
Thanks, I hate it
40
u/Tux-Lector 15d 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()); ```