orhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 6 months agoPeak code reuseeviltoast.orgexternal-linkmessage-square43linkfedilinkarrow-up1456arrow-down16
arrow-up1450arrow-down1external-linkPeak code reuseeviltoast.orgorhtej2@eviltoast.org to Programmer Humor@programming.devEnglish · 6 months agomessage-square43linkfedilink
minus-squarebobo@lemmy.mllinkfedilinkarrow-up1·6 months agoGood point, but you can do if === true… and else if === false… But definitely better to throw an error instead of nan.
Good point, but you can do if === true… and else if === false…
But definitely better to throw an error instead of nan.