📅  最后修改于: 2022-03-11 14:56:31.604000             🧑  作者: Mango
function findOutlier(integers) {
var evens = integers.filter(number => number % 2 == 0);
var odds = integers.filter(number => number % 2 != 0);
if (evens.length === 1) {
return evens[0];
} else if (odds.length === 1) {
return odds[0];
}
}