79398202

Date: 2025-01-29 21:16:37
Score: 1
Natty:
Report link

I think this looks good

return conditionA ? a
  : conditionB ? b
  : conditionC ? c
  : default;

In your context:

return foo ? 1 
  : bar ? 2
  : 3;

Lining up the variables would look nice too

return foo ? 1 
     : bar ? 2
     : 3;
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Devin Li