• lee
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    personally I prefer

    const testStuff = condition
      ? outcome(1) 
      : outcome(2); 
    
    • Marxine@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Also works fine and is better than inlining it all. I’m just more used to ending the lines with the symbols - instead of starting the next line with them like your example - because it’s the same parttern I use for other stuff, like (curly) brackets.