• nighty
    link
    fedilink
    61 year ago

    we can remove the return!

    const fn = (a, b) => a || b
    
    • nickA
      link
      English
      51 year ago
      const fn = (a, b) => a ?? b
      
      • shastaxc
        link
        fedilink
        21 year ago

        But this just creates a function. You still have to call it.

        • nickA
          link
          21 year ago
          ((a, b) => a ?? b)();