forked from jimmyislive/coderbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck-nums.js
More file actions
20 lines (13 loc) · 735 Bytes
/
Copy pathcheck-nums.js
File metadata and controls
20 lines (13 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
Have the function CheckNums(num1,num2) take both parameters being passed and return true if num2 is greater than num1, otherwise return false. If the parameter values are equal to each other then return the number -1. Use the Parameter Testing feature in the box below to test your code with different arguments. Do not modify the function name within the code. Do not put any code outside of the function and use the return keyword to return your answer from within the function.
*/
function CheckNums(num1,num2) {
if (num1 == num2) {
return -1;
} else {
return num2 > num1;
}
}
// this call is needed to test your function
// keep this when you submit your code
CheckNums(num1,num2)