8000
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 314a795 commit 2457cb4Copy full SHA for 2457cb4
sumAll/sumAll.js
@@ -1,5 +1,5 @@
1
const sumAll = function(min, max) {
2
- if (typeof min !== "number" || typeof max !== "number") return "ERROR";
+ if (!Number.isInteger(min) || !Number.isInteger(max)) return "ERROR";
3
if (min < 0 || max < 0) return "ERROR";
4
if (min > max) {
5
const temp = min;
0 commit comments