Skip to content

Commit a14da3d

Browse files
committed
improve error handling of isDivisible
1 parent 4dc0be8 commit a14da3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Maths/IsDivisible.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
export const isDivisible = (num1, num2) => {
44
if (!Number.isFinite(num1) || !Number.isFinite(num2)) {
5-
throw new Error('All parameters have to be numbers')
5+
throw new TypeError("Expected a number")
66
}
77
if (num2 === 0) {
88
return false

0 commit comments

Comments
 (0)