kora@sh.itjust.works to Programmer Humor@programming.dev · 9 days agostopsh.itjust.worksimagemessage-square52fedilinkarrow-up1440arrow-down124
arrow-up1416arrow-down1imagestopsh.itjust.workskora@sh.itjust.works to Programmer Humor@programming.dev · 9 days agomessage-square52fedilink
minus-squaredouglasg14b@lemmy.worldlinkfedilinkarrow-up3·8 days agoWell, this is in JS to be clear Instead of const name = user.name It’s const userToName(user) => user.name; const name = userToName(user); Ad nauseum.
minus-squarebleistift2@sopuli.xyzlinkfedilinkEnglisharrow-up2·edit-28 days agoI was afraid you’d say that. That’s stupid. Do they give a reason for why that’s ‘necessary’? (Also it should be const userToName = (user) => user.name;)
Well, this is in JS to be clear
Instead of
const name = user.name
It’s
const userToName(user) => user.name;
const name = userToName(user);
Ad nauseum.
I was afraid you’d say that. That’s stupid.
Do they give a reason for why that’s ‘necessary’?
(Also it should be
const userToName = (user) => user.name;
)