everyutil
Version:
A comprehensive library of lightweight, reusable utility functions for JavaScript and TypeScript, designed to streamline common programming tasks such as string manipulation, array processing, date handling, and more.
9 lines (8 loc) • 322 B
TypeScript
/**
* Returns the cumulative sum of an array of numbers.
* For example, cumulativeSum([1,2,3]) returns [1,3,6].
* @author @dailker
* @param {number[]} array - The input array of numbers.
* @returns {number[]} The array of cumulative sums.
*/
export declare function cumulativeSum(array: number[]): number[];