philnash@programming.dev to JavaScript@programming.devEnglish · 10 months agoStop nesting ternaries in JavaScriptwww.sonarsource.comexternal-linkmessage-square29fedilinkarrow-up113arrow-down12
arrow-up111arrow-down1external-linkStop nesting ternaries in JavaScriptwww.sonarsource.comphilnash@programming.dev to JavaScript@programming.devEnglish · 10 months agomessage-square29fedilink
minus-squaresnowe@programming.devlinkfedilinkarrow-up2arrow-down1·10 months agothey also said switch expressions, which indicates they want the switch statement to be settable directly to a variable with whatever the return type of the switch is.
minus-squarespartanatreyu@programming.devlinkfedilinkarrow-up2·10 months agoMatch already returns the value which can be thrown into a variable.
they also said switch
expressions
, which indicates they want the switch statement to be settable directly to a variable with whatever the return type of the switch is.Match already returns the value which can be thrown into a variable.