how to filter through array extracting only numbers in js code example
Example: how to filter through array extracting only numbers in 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')