📅  最后修改于: 2022-03-11 15:03:06.982000             🧑  作者: Mango
function cleanUpArray(arr) {
let intArray = arr.map(x => parseInt(x))
let evenArray = []
intArray.map(x => {
if(x % 2 === 0){
evenArray.push(x)
}
})
let oddArray = []
intArray.map(x => {
if(x % 2 !== 0){
oddArray.push(x)
}
})
return [evenArray, oddArray]
}