A function aritGeo that takes one argument, an array. You are required to check if the array passed as an argument is arithmetic, geometric, neither arithmetic nor geometric in progression or if the array is empty. For arithmetic progressions, return Arithmetic
. For geometric progressions, return Geometric
. For neither of the above, return -1
. For an empty array, return 0
. It includes ten(10) test cases written with Mocha and Chai .
danoseun / self-learning-day-0 Goto Github PK
View Code? Open in Web Editor NEWA function **aritGeo** that takes one argument, an array. You are required to check if the array passed as an argument is arithmetic, geometric, neither arithmetic nor geometric in progression or if the array is empty. For arithmetic progressions, return `Arithmetic`. For geometric progressions, return `Geometric`. For neither of the above, return `-1`. For an empty array, return `0`. It includes ten(10) test cases written with Mocha and Chai .