HiddenLayer555@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 20 days agoWhy make it complicated?lemmy.mlexternal-linkmessage-square52fedilinkarrow-up1114arrow-down118file-textcross-posted to: [email protected]
arrow-up196arrow-down1external-linkWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 20 days agomessage-square52fedilinkfile-textcross-posted to: [email protected]
minus-squareThirdConsul@lemmy.mllinkfedilinkarrow-up4·20 days agolet ret = someCondition ? expensiveOperation() : otherOperation() ?
let ret = someCondition ? expensiveOperation() : otherOperation()
?
Yeah. That works.