• nighty
    link
    fedilink
    610 months ago

    we can remove the return!

    const fn = (a, b) => a || b
    
    • nickA
      link
      English
      510 months ago
      const fn = (a, b) => a ?? b
      
      • shastaxc
        link
        fedilink
        210 months ago

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

        • nickA
          link
          210 months ago
          ((a, b) => a ?? b)();