Skip to main content

Posts

Showing posts from December, 2020

Map,Filter,Reduce array functions in Javascript

Today let's discuss about the following array functions in Javascript which most of the developers use it for ease of use Map function actually reads thru the entire array and we can perform any operation on each array item The output here would be Filter function as the name suggests we can add any condition and will return only values returning true The output here would be Reduce function it is used for accumulating values in a array by doing some kind of arithmetical operation to each item in array. In the following example we are using addition as an example The output here would be