623
you are viewing a single comment's thread
view the rest of the comments
[-] nigh7y@lemmy.ml 6 points 1 year ago

we can remove the return!

const fn = (a, b) => a || b
[-] nick@campfyre.nickwebster.dev 5 points 1 year ago
[-] nigh7y@lemmy.ml 3 points 1 year ago

Gotta love some peer review

[-] shasta@lemm.ee 2 points 1 year ago

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

[-] nick@campfyre.nickwebster.dev 2 points 1 year ago
((a, b) => a ?? b)();
this post was submitted on 08 Dec 2023
623 points (96.4% liked)

Programmer Humor

32753 readers
30 users here now

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

Rules:

founded 5 years ago
MODERATORS