UNPKG

es-next-tools

Version:

A comprehensive utility library for JavaScript and TypeScript that provides a wide range of functions for common programming tasks, including mathematical operations, date manipulations, array and object handling, string utilities, and more.

12 lines (11 loc) 325 B
/** * Calculates the number of combinations (n choose k). * @param {number} n - The total number of items. * @param {number} k - The number of items to choose. * @returns The number of possible combinations. * @example * ```js * comb(5, 3); // 10 * ``` */ export declare function comb(n: number, k: number): number;