The goal for this exercise is to create a calculator that does the following:
add(): take two numbers and return their sumsubtract(): take two numbers and return the result after subtracting the second from the firstsum(): take an array of numbers and add all the numbers togethermultiply(): take an array of numbers and multiply all the numbers togetherpower(): take two numbers (base and exponent) and return the result of raising the base to that exponentfactorial(): given a single number, find its factorial
Please fill out each function with your solution. Make sure to return the value so you can test it in Jest! To see the expected value, take a look at the .spec.js file that houses the Jest test cases.