8000 Fix dumb syntax errors everywhere · b-cheng/javascript-exercises@c602ea2 · GitHub
[go: up one dir, main page]

Skip to content

Commit c602ea2

Browse files
committed
Fix dumb syntax errors everywhere
1 parent b8baa8d commit c602ea2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sumAll/sumAll.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const sumAll = function(first, last) {
2-
if ((first < 0) || (!first.typeOf === 'number')) {
2+
if ((first < 0) || ( 7B7C last < 0)) {
33
return 'ERROR'
4-
} else if ((last < 0) || (!last.typeOf === 'number')) {
4+
} else if ( typeof first !== "number" || typeof last !== "number") {
55
return 'ERROR'
66
} else if (first < last) {
77
var finalSum=0
@@ -21,4 +21,4 @@ const sumAll = function(first, last) {
2121
}
2222
}
2323

24-
module.exports = sumAll
24+
module.exports = sumAll

0 commit comments

Comments
 (0)
0