cara menyaring melalui array hanya mengekstraksi angka di js

//if its an array of objects
arr.filter((item) => typeof(item.key) === 'number')

//if its an array of values
arr.filter((item) => typeof(item) === 'number')
Bad Bee