Skip to content

Rahinmon2903/MRF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MRF (MAP, REDUCE, FILTER) ✅ Map

Definition: The map() method does not change the original array; it creates a new array. If the array contains objects, the new array contains references to the same objects. Modifying an object in the new array will affect the original object, but the change is caused by the modification itself, not by map().

Syntax:

{emojipedia.map(createEntry)}

✅ Filter

Definition: It simply filters the array based on a condition. Unlike map(), it does not create references to the original objects for primitive values. However, when dealing with objects, both filter() and map() create references to the same objects.

Syntax:

let newreduce = number.filter(x => { return x > 10; });

✅ Reduce

Definition: reduce() goes through every element in an array and combines all its elements into a single value.

Syntax:

let sum = num.reduce((x, y) => { return x + y; });

About

This section explains three commonly used JavaScript array methods: Map, Reduce, and Filter (MRF). These methods help in processing and transforming data efficiently.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors