mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-16 13:30:00 +00:00
5 lines
170 B
TypeScript
5 lines
170 B
TypeScript
export function maxOf(values: readonly number[], initial: number): number {
|
|
let max = initial
|
|
for (const value of values) if (value > max) max = value
|
|
return max
|
|
}
|