Mathematical Calculations
5 JavaScript mathematical calculations challenges, each with test cases you can run in the browser.
- isPrime — Medium. Given a number, return true if the number is prime, otherwise return false.
- power — Medium. Given a base and an exponent, return the base to the power of the exponent. You can assume the exponent is a non-negative integer. Do not us
- sumAll — Easy. We'll pass you an array of two numbers. Return the sum of those two numbers plus the sum of all the numbers between them. The lowest number
- celsiusToFahrenheit — Easy. The algorithm to convert from Celsius to Fahrenheit is the temperature in Celsius times 9/5, plus 32.
- sumFibs — Medium. Given a positive integer num, return the sum of all odd Fibonacci numbers that are less than or equal to num.