Stop nesting ternaries in JavaScriptwww.sonarsource.comexternal-link philnash ( @philnash@programming.dev ) JavaScript@programming.devEnglish • 10 months ago message-square25fedilinkarrow-up126
arrow-up126external-linkStop nesting ternaries in JavaScriptwww.sonarsource.com philnash ( @philnash@programming.dev ) JavaScript@programming.devEnglish • 10 months ago message-square25fedilink
minus-square snowe ( @snowe@programming.dev ) linkfedilink2•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-square spartanatreyu ( @spartanatreyu@programming.dev ) linkfedilink2•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.