A javascript one that has pretty reasonable complexity

functionfindOutlier(integers){// The first three ints can be used to determine whether we are // looking for an odd or an even// If at least two are even, then we're looking for the odd integerconsttypicalIntegerIsEven=isEven(integers[0])+isEven(integers[1])+isEven(integers[2])>=2// Return the first integer that is non-typicalreturnintegers.find(v=>isEven(v)!=typicalIntegerIsEven)// Helper function to determine if a number is even or odd// Note that (-1)%2 === -1 and some integers might be negative.// (-2)%2 === -0 and -0 === 0, so this check will work for any integer.// v&1 is better in many ways, but only goes up to 32 bit intsfunctionisEven(v){returnv%2===0}}

## re: Daily Challenge #35 - Find the Outlier VIEW POST

FULL DISCUSSIONA javascript one that has pretty reasonable complexity