philnash to JavaScriptEnglish · 1 year agoStop nesting ternaries in JavaScriptwww.sonarsource.comexternal-linkmessage-square34fedilinkarrow-up143arrow-down111
arrow-up132arrow-down1external-linkStop nesting ternaries in JavaScriptwww.sonarsource.comphilnash to JavaScriptEnglish · 1 year agomessage-square34fedilink
minus-squaresnoweAlinkfedilinkarrow-up2arrow-down1·1 year 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-squarespartanatreyulinkfedilinkarrow-up2·1 year 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.