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 b8baa8d commit c602ea2Copy full SHA for c602ea2
sumAll/sumAll.js
@@ -1,7 +1,7 @@
1
const sumAll = function(first, last) {
2
- if ((first < 0) || (!first.typeOf === 'number')) {
+ if ((first < 0) || ( 7B7C last < 0)) {
3
return 'ERROR'
4
- } else if ((last < 0) || (!last.typeOf === 'number')) {
+ } else if ( typeof first !== "number" || typeof last !== "number") {
5
6
} else if (first < last) {
7
var finalSum=0
@@ -21,4 +21,4 @@ const sumAll = function(first, last) {
21
}
22
23
24
-module.exports = sumAll
+module.exports = sumAll
0 commit comments