challenge-algorithms-v2.0-w.../03-maxValue/index.js

11 lines
136 B
JavaScript
Raw Normal View History

export function maxValue(values) {
2022-10-28 23:13:28 +00:00
if (values == `${[]}`) {
return 0
} else {
return Math.max.apply(null, values);
}
}