JavaScript filter Array Method in Depth

  Рет қаралды 6,639

Zaiste Programming

Zaiste Programming

4 жыл бұрын

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: bit.ly/zaiste-weekly
#functional #javascript #filter

Пікірлер: 8
@akhtarandroid
@akhtarandroid 3 жыл бұрын
This is the best explanation I have found on youtube for higher order functions and the filter function. Very glad you made this series and it deserves a lot more views.
@Aziz-kw6ct
@Aziz-kw6ct Жыл бұрын
Thanks for that content, it was very useful to me. thx
@kim92se64
@kim92se64 4 жыл бұрын
Sir what a awesome video on Filter array method i never seen like that video on filters
@MuhammadAli-hs3cl
@MuhammadAli-hs3cl Жыл бұрын
Merci beaucoup!
@AndySongCode
@AndySongCode 4 жыл бұрын
for logging array, I'd like to use console.table(result) rather than console.log(result);
@brokenoho
@brokenoho 3 жыл бұрын
What are you using to run this code, can I do this as easily in vscode?
@brokenoho
@brokenoho 3 жыл бұрын
Great explanation btw, just subscribed!
@AndySongCode
@AndySongCode 4 жыл бұрын
Array.prototype.myOwnFilter = function(predicate) { const result = []; for (let item of this) { if (predicate(item)) { result.push(item); } } return result; }; console.table(people.myOwnFilter(person => person.born > 1945)); //I think we can also have our own filter implementation.
Understanding JavaScript's map() Array Method
13:08
Zaiste Programming
Рет қаралды 2,7 М.
Functional JavaScript Tutorial - #1: Functions
21:37
Zaiste Programming
Рет қаралды 10 М.
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 33 МЛН
1 or 2?🐄
00:12
Kan Andrey
Рет қаралды 51 МЛН
Vivaan  Tanya once again pranked Papa 🤣😇🤣
00:10
seema lamba
Рет қаралды 34 МЛН
Самое Романтичное Видео ❤️
00:16
Глеб Рандалайнен
Рет қаралды 6 МЛН
JavaScript Array filter method
9:15
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 18 М.
An Introduction to Higher-Order Functions in JavaScript
16:45
Zaiste Programming
Рет қаралды 4,4 М.
16.7: Array Functions: reduce() - Topics of JavaScript/ES6
14:40
The Coding Train
Рет қаралды 132 М.
Exercises: Array Filter - Javascript In Depth
31:46
Tech with Nader
Рет қаралды 1,5 М.
Functional JavaScript Tutorial - #3 Side Effects & Pure Functions
18:44
Zaiste Programming
Рет қаралды 5 М.
Unlocking your CPU cores in Python (multiprocessing)
12:16
mCoding
Рет қаралды 296 М.
16.8: Array Functions: filter() - Topics of JavaScript/ES6
11:11
The Coding Train
Рет қаралды 130 М.
Easy Art with AR Drawing App - Step by step for Beginners
0:27
Melli Art School
Рет қаралды 10 МЛН
Как слушать музыку с помощью чека?
0:36
Спутниковый телефон #обзор #товары
0:35
Product show
Рет қаралды 2,2 МЛН