philnash@programming.dev to JavaScript@programming.dev • 11 months agoStop nesting ternaries in JavaScriptexternal-linkmessage-square17 fedilinkarrow-up121
arrow-up121external-linkStop nesting ternaries in JavaScriptphilnash@programming.dev to JavaScript@programming.dev • 11 months agomessage-square17 Commentsfedilink
minus-squaresnowe@programming.devhexbear2·11 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. linkfedilink
minus-squarespartanatreyu@programming.devhexbear2·11 months agoMatch already returns the value which can be thrown into a variable. linkfedilink
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.