Skip to main content

Find the minimum item of an array

JavaScript version

const min = (arr) => Math.min(...arr);

TypeScript version

const min = (arr: number[]): number => Math.min(...arr);

Comments