Create a function with two parameters a and b that calculates the sum of all the numbers between a and b and returns it. Both a and b are included in the sum.You can assue that a will be smaller than b.
CODE TEMPLATE
// write your code here
console.log(sumBetween(5, 8));//
console.log(sumBetween(6, 12));//63
Modify the function in Part1 to include the possibility when a is greater than b
console.log(sumBetween(10, 8));//27
Modify the function to include the possibility that a can be equal to b. In that case the function should just return either of the two numbers.
console.log(sumBetween(6, 6));//6