8000 Merge pull request #82 from Musabii/patch-2 · GeraldCO/javascript-exercises@314a795 · GitHub
[go: up one dir, main page]

Skip to content

Commit 314a795

Browse files
authored
Merge pull request TheOdinProject#82 from Musabii/patch-2
changed the order of if conditions
2 parents 3b51e5d + f9a972e commit 314a795

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sumAll/sumAll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const sumAll = function(min, max) {
2-
if (min < 0 || max < 0) return "ERROR";
32
if (typeof min !== "number" || typeof max !== "number") return "ERROR";
3+
if (min < 0 || max < 0) return "ERROR";
44
if (min > max) {
55
const temp = min;
66
min = max;

0 commit comments

Comments
 (0)
0