Travis build: 1421 [cron]
This commit is contained in:
3
test/reduceWhich/reduceWhich.js
Normal file
3
test/reduceWhich/reduceWhich.js
Normal file
@ -0,0 +1,3 @@
|
||||
const reduceWhich = (arr, comparator = (a, b) => a - b) =>
|
||||
arr.reduce((a, b) => (comparator(a, b) >= 0 ? b : a));
|
||||
module.exports = reduceWhich
|
||||
Reference in New Issue
Block a user