Answers for "how to filter an array to only get numbers"

0

how to filter an array to only get numbers

function filterArray(arr) {
	return arr.filter(el => Number.isInteger(el));
}
Posted by: Guest on August-02-2021

Code answers related to "how to filter an array to only get numbers"

Code answers related to "Javascript"

Browse Popular Code Answers by Language