JavaScript filter Array Method in Depth

Publié le: 10 septembre 2019
sur la chaîne: Zaiste Programming
6,914
121

In JavaScript, the filter() function is used to filter out the items from an array based on a condition provided as input in the form of a predicate. This function is defined as a method on the Array object so that it can be invoked from any array.

Predicates can be used to define conditions for the filtering process. We use predicates to decide whether or not to keep each item in or not.

Functional programming is a programming paradigm in which you build programs by composing functions. The computation is then the evaluation of those functions. Functional programming focuses on the usage of pure functions and on avoiding shared, mutable state. This programming paradigm is declarative. Functional code is usually more concise and easier to test.

In this mini series, we will embark on an exciting journey to learn a bit about functional programming by using JavaScript. Presented concepts will be mostly universal and applicable to other programming languages. This series is created with beginners and non-programmers in mind; don't worry, we will take it slowly!

Zaiste Weekly Newsletter: https://bit.ly/zaiste-weekly

#functional #javascript #filter


Sur cette page du site, vous pouvez voir la vidéo en ligne JavaScript filter Array Method in Depth durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Zaiste Programming 10 septembre 2019, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 6,914 fois et il a aimé 121 téléspectateurs. Bon visionnage!