📅  最后修改于: 2022-03-11 15:01:57.905000             🧑  作者: Mango
代码示例1
const arr = [3, 4.5, 6, 1.1]
const integers = arr.filter(n => Number.isInteger(n));
console.log(integers)
// output [3, 6]