Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to filter an array to only get numbers

function filterArray(arr) {
	return arr.filter(el => Number.isInteger(el));
}
 
PREVIOUS NEXT
Tagged: #filter #array #numbers
ADD COMMENT
Topic
Name
8+7 =