jroid8@lemmy.world to Programmer Humor@lemmy.ml · 9 months agoknow the features of your languagelemmy.worldimagemessage-square145fedilinkarrow-up1644arrow-down124
arrow-up1620arrow-down1imageknow the features of your languagelemmy.worldjroid8@lemmy.world to Programmer Humor@lemmy.ml · 9 months agomessage-square145fedilink
minus-squarenighty@lemmy.mllinkfedilinkarrow-up6·9 months agowe can remove the return! const fn = (a, b) => a || b
minus-squarenick@campfyre.nickwebster.devlinkfedilinkEnglisharrow-up5·9 months agoconst fn = (a, b) => a ?? b
minus-squareshastaxc@lemm.eelinkfedilinkarrow-up2·9 months agoBut this just creates a function. You still have to call it.
we can remove the return!
const fn = (a, b) => a ?? b
Gotta love some peer review
But this just creates a function. You still have to call it.
((a, b) => a ?? b)();