coderbyte
coderbyte copied to clipboard
A few math magic
//another approach function arithGeo(arr) { if (arr.length === 1 || arr.length === 0) { return -1; }
if(arr[0]*arr[2] === arr[1]*arr[1]) return "Geometric";
else return "Arithmetic";
}