<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/a-detailed-look-at-filter-map-and-reduce-in-javascript-dsqrsdanv" -->

---
title: A Detailed Look at filter(), map(), and reduce() in...
description: In JavaScript, we have these three methods as a part of the Array.prototype method. The filter() method applies to an array and then creates a new array. The...
canonical: https://daily.dev/posts/a-detailed-look-at-filter-map-and-reduce-in-javascript-dsqrsdanv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: A Detailed Look at filter(), map(), and reduce() in JavaScript | daily.dev
og:description: In JavaScript, we have these three methods as a part of the Array.prototype method. The filter() method applies to an array and then creates a new array. The...
og:url: https://daily.dev/posts/a-detailed-look-at-filter-map-and-reduce-in-javascript-dsqrsdanv
og:image: https://api.daily.dev/og/posts/DSqrSdAnV.png
og:image:alt: A Detailed Look at filter(), map(), and reduce() in JavaScript
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# A Detailed Look at filter(), map(), and reduce() in JavaScript

**[JavaScript in Plain English](https://daily.dev/sources/jsPlainEnglish)** · 5 min read · 19 upvotes · 0 comments

## Summary

In JavaScript, we have these three methods as a part of the Array.prototype method. The filter() method applies to an array and then creates a new array. The map() method transforms the elements of that array as its function pleases. The reduce() method reduces an array to a single value.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://javascript.plainenglish.io/take-a-good-look-at-filter-map-and-reduce-in-javascript-18d72f483ada?source=rss----4b3a1ed4f11c---4>

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/a-detailed-look-at-filter-map-and-reduce-in-javascript-dsqrsdanv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"A Detailed Look at filter(), map(), and reduce() in JavaScript","url":"https://daily.dev/posts/a-detailed-look-at-filter-map-and-reduce-in-javascript-dsqrsdanv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/a-detailed-look-at-filter-map-and-reduce-in-javascript-dsqrsdanv"},"datePublished":"2022-05-27T03:14:58.265Z","dateModified":"2022-05-27T03:14:58.265Z","description":"In JavaScript, we have these three methods as a part of the Array.prototype method. The filter() method applies to an array and then creates a new array. The...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/488a18da8d5be0f17581ab4d378a556b","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/488a18da8d5be0f17581ab4d378a556b","isAccessibleForFree":true,"articleSection":"JavaScript in Plain English","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"JavaScript in Plain English","logo":"https://media.daily.dev/image/upload/s--Dg5QTRuI--/f_auto,q_auto/v1686665538/logos/pe","url":"https://daily.dev/sources/jsPlainEnglish"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/a-detailed-look-at-filter-map-and-reduce-in-javascript-dsqrsdanv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":19},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"JavaScript in Plain English","item":"https://daily.dev/sources/jsPlainEnglish"},{"@type":"ListItem","position":3,"name":"A Detailed Look at filter(), map(), and reduce() in JavaScript"}]}
```

