Articles → JAVASCRIPT → Array Filter Function In Javascript
Array Filter Function In Javascript
Purpose
Example
<html><head></head><body><script>
var arr = [12, 15, 21, 23];
console.log(arr.filter(FilterArray));
function FilterArray(arr) {
return arr > 14;
}
</script></body></html>
Output