📅  最后修改于: 2022-03-11 15:02:25.801000             🧑  作者: Mango
const stray = numbers => {
let number = 0
numbers.forEach(x => numbers.indexOf(x) ? number = x : null)
return number
}
console.log(stray([17, 17, 3, 17, 17, 17, 17]))