Answers for "find outlier js"

0

find outlier js

function findOutlier(int){
  var even = int.filter(a=>a%2==0);
  var odd = int.filter(a=>a%2!==0);
  return even.length==1? even[0] : odd[0];
}
Posted by: Guest on October-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language