Returns the smallest element in an iterable. The optional key argument specifies a transform on the elements before comparing them. If the elements in the iterable are objects that implement a custom lt method, this will be called to compare.
Returns
The smallest element in the iterable.
Parameters
iterable: number[]
The iterable to inspect.
Returns number
min<T>(iterable: Iterable<T>, key?: Predicate<T, any>): T
Returns the smallest element in an iterable. The optional
key
argument specifies a transform on the elements before comparing them. If the elements in the iterable are objects that implement a customlt
method, this will be called to compare.Returns
The smallest element in the iterable.