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


Picture showing the output of Array filter function in JavaScript



Posted By  -  Karan Gupta
 
Posted On  -  Thursday, August 26, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250