Chalkboard - v3.0.1
    Preparing search index...

    Function combination

    • Returns the combinatorial combination of two numbers.

      Parameters

      • n: number

        First number (total items)

      • r: number

        Second number (chosen items)

      Returns number

      // The number of five-card hands possible from a standard fifty-two card deck is 2598960
      const combine = Chalkboard.numb.combination(52, 5);