this post was submitted on 08 Dec 2023
622 points (96.4% liked)

Programmer Humor

32739 readers
341 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 6 points 1 year ago (4 children)

we can remove the return!

const fn = (a, b) => a || b
[–] [email protected] 5 points 1 year ago (2 children)
[–] [email protected] 3 points 1 year ago

Gotta love some peer review

[–] [email protected] 2 points 1 year ago (1 children)

But this just creates a function. You still have to call it.

[–] [email protected] 2 points 1 year ago
((a, b) => a ?? b)();
load more comments (1 replies)