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 coloredgrayscale ( @coloredgrayscale@programming.dev ) linkfedilink9•10 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-square kassuro ( @kassuro@feddit.de ) linkfedilink2•10 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.