mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-04 07:29:47 +08:00
merge: More accurate error message at IsDivisible
(#1048)
* More accurate error message * Lowercased "R"
This commit is contained in:

committed by
GitHub

parent
6b06b3a37f
commit
95a8ec08ed
@ -2,7 +2,7 @@
|
||||
|
||||
export const isDivisible = (num1, num2) => {
|
||||
if (!Number.isFinite(num1) || !Number.isFinite(num2)) {
|
||||
throw new TypeError('Expected a number')
|
||||
throw new TypeError('Expected a valid real number')
|
||||
}
|
||||
if (num2 === 0) {
|
||||
return false
|
||||
|
Reference in New Issue
Block a user