Skip to content

Tag: functional

filter() – Javascript Functional Programming

Previously, we have explored map() in JavaScript. Now it’s time to see how to use the filter() in our JavaScript code. The filter() is a function on the array that accepts another function as its argument which it will use to return new filtered version of the array. Let’s take an array to experiment It’s a pretty simple array, doesn’t it? We are going to use the same array in all the code throughout the post. Now we are going to filter out the games from the array which are… Read more filter() – Javascript Functional Programming

map() – JavaScript Functional Programming

What is functional programming? Functional programming is a programming paradigm, the process of building components using pure functions and avoiding shared state, mutable data and side-effects. In simple, functional programming is doing our tasks with functions, avoiding side effects by using pure functions. For example, Without iterating the list using user defined loops; we can iterate the list using the functions like map(), reduce(), and filter() Let’s see about map() function in this post. I have started exploring about functional programming in recent times. The topic looks very interesting and… Read more map() – JavaScript Functional Programming