coderbyte icon indicating copy to clipboard operation
coderbyte copied to clipboard

A few math magic

Open denizumutdereli opened this issue 3 years ago • 0 comments

//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";
 

}

denizumutdereli avatar Jan 20 '22 12:01 denizumutdereli