philnash@programming.dev to JavaScript@programming.devEnglish · 11 months agoStop nesting ternaries in JavaScriptwww.sonarsource.comexternal-linkmessage-square5fedilinkarrow-up10arrow-down10
arrow-up10arrow-down1external-linkStop nesting ternaries in JavaScriptwww.sonarsource.comphilnash@programming.dev to JavaScript@programming.devEnglish · 11 months agomessage-square5fedilink
minus-squarecoloredgrayscale@programming.devlinkfedilinkarrow-up0·11 months ago pleasure of refactoring this mess took half an hour to understand If you can use any of the jetBrains IDE it can rewrite it to if/else with a few clicks (or [alt] +[return])
minus-squarekassuro@feddit.delinkfedilinkarrow-up0·11 months agoAh that would be helpful. Gotta try that the next time I encounter such a monstrosity.
If you can use any of the jetBrains IDE it can rewrite it to if/else with a few clicks (or [alt] +[return])
Ah that would be helpful. Gotta try that the next time I encounter such a monstrosity.