Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dc0be8 commit a14da3dCopy full SHA for a14da3d
1 file changed
Maths/IsDivisible.js
@@ -2,7 +2,7 @@
2
3
export const isDivisible = (num1, num2) => {
4
if (!Number.isFinite(num1) || !Number.isFinite(num2)) {
5
- throw new Error('All parameters have to be numbers')
+ throw new TypeError("Expected a number")
6
}
7
if (num2 === 0) {
8
return false
0 commit comments