HiddenLayer555@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 4 days agoWhy make it complicated?lemmy.mlimagemessage-square48linkfedilinkarrow-up111arrow-down10file-textcross-posted to: [email protected]
arrow-up111arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 4 days agomessage-square48linkfedilinkfile-textcross-posted to: [email protected]
minus-squareThirdConsul@lemmy.mllinkfedilinkarrow-up1·3 days agolet ret = someCondition ? expensiveOperation() : otherOperation() ?
let ret = someCondition ? expensiveOperation() : otherOperation()
?
Yeah. That works.