philnash ( philnash@programming.dev ) to JavaScript@programming.devEnglish · 3 years agoStop nesting ternaries in JavaScriptwww.sonarsource.comexternal-linkmessage-square25linkfedilinkarrow-up126
arrow-up126external-linkStop nesting ternaries in JavaScriptwww.sonarsource.comphilnash ( philnash@programming.dev ) to JavaScript@programming.devEnglish · 3 years agomessage-square25linkfedilink
minus-squaresnowe ( snowe@programming.dev ) linkfedilinkarrow-up2·3 years 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 ( spartanatreyu@programming.dev ) linkfedilinkarrow-up2·3 years 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.