williamolojede / bootcamp

Challenges For the Andela bootcamp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bootcamp

Challenge 1

Write a function called 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. Your logic should be as efficient as possible (with minimal iterations). Also write tests for your solution using Mocha & Chai (at least 10 test cases). Finally, push the solution and tests to GitHub.

About

Challenges For the Andela bootcamp


Languages

Language:JavaScript 100.0%