The sum between two numbers
Given the two numbers, sum up the two numbers as well as the numbers between. Return the result
Sample Code:
function sumBetween(num1,num2) {
// Enter your logic here...
}
Examples:
Input: 2,6
Output: 20
Explanation: 20 is the result of adding up 2,3,4,5,6.
Input: 4,-2
Output: 7
Explanation: 7 is the result of adding up 4,3,2,1,0,-1,-2.