typescript mean median code example
Example: how to get the median in typescript
export function median(pool: number[]): number {
return pool[Math.floor((pool.length - 1) / 2)];
}
export function median(pool: number[]): number {
return pool[Math.floor((pool.length - 1) / 2)];
}