max
Returns the maximum number of an array.
Usage
ts
import { max } from '@screaming/utils'
max([1, 2, 3, 4, 5])
// 5
1
2
3
4
2
3
4
Type Definitions
ts
/**
* @param array - The array of numbers.
* @returns The maximum number.
*/
export declare function max(array: readonly number[]): number | undefined
1
2
3
4
5
2
3
4
5