1 LOC
GitHub 0★
Categories
Array
Date Time
DOM
Function
Math
Misc
Number
Object
Random
String
Validator
Ad
Find the maximum item of an array
JavaScript version
const
max
=
(
arr
)
=>
Math
.
max
(
...
arr
)
;
TypeScript version
const
max
=
(
arr
:
number
[
]
)
:
number
=>
Math
.
max
(
...
arr
)
;
Find the maximum item of an array by given key
Find the minimum item of an array by given key