source: node_modules/es-toolkit/dist/math/sum.d.ts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 460 bytes
RevLine 
[a762898]1/**
2 * Calculates the sum of an array of numbers.
3 *
4 * This function takes an array of numbers and returns the sum of all the elements in the array.
5 *
6 * @param {number[]} nums - An array of numbers to be summed.
7 * @returns {number} The sum of all the numbers in the array.
8 *
9 * @example
10 * const numbers = [1, 2, 3, 4, 5];
11 * const result = sum(numbers);
12 * // result will be 15
13 */
14declare function sum(nums: readonly number[]): number;
15
16export { sum };
Note: See TracBrowser for help on using the repository browser.