Skip to content

Commit 367204a

Browse files
authored
Update max.js
1 parent 409eefc commit 367204a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Sprint-1/implement/max.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function findMax(elements) {
22
const floats = elements
33
.filter(x => {
4-
const str = String(x).replace("-", "").replace(".", "");
4+
const str = String(x);
55
return !isNaN(str) && str !== "";
66
})
77
.map(x => Number(x));

0 commit comments

Comments
 (0)