JS Cara memfilter hanya bilangan real dari desimal

const arr = [3, 4.5, 6, 1.1]
const integers = arr.filter(n => Number.isInteger(n));
console.log(integers)
// output [3, 6]
MrStonkus