Skip to content

Commit b702faa

Browse files
committed
feat(Polynomial.js): Fixed bad code
1 parent f1769c4 commit b702faa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Maths/Polynomial.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@ class Polynomial {
3232
return `(${coefficient}x^${exponent})`
3333
}
3434
})
35-
.filter((x) => {
36-
if (x !== '0') {
37-
return x
38-
}
39-
})
35+
.filter((x) =>
36+
x !== '0'
37+
)
4038
.reverse()
4139
.join(' + ')
4240
}

0 commit comments

Comments
 (0)