Modern JavaScript (ES6+) for Beginners
Lesson 8 of 12 67% of course

Array Methods — map, filter, find & reduce

1 · 5 min · 6/7/2026

Learn Array Methods — map, filter, find & reduce in our free Modern JavaScript (ES6+) for Beginners series. Step-by-step explanations, examples, and interview tips on Toolliyo Academy.

Sign in to track progress and bookmarks.

Array Methods — map, filter, find & reduce
Lesson 8 of 12 · Part 3 — Data & Collections · Modern JavaScript (ES6+) for Beginners
Course: Modern JavaScript (ES6+) for Beginners · Lesson: 8/12 · Read time: ~20 min · Level: Beginner · ES version: ES2015 (ES6) and above

Array Methods — map, filter, find & reduce

These four methods replace most for loops in real apps. React renders lists with map. APIs return arrays you filter and reduce for totals. Master these before React — you will use them every day.

map — transform each item

const prices = [499, 999, 0];
const withGst = prices.map(p => Math.round(p * 1.18));
// [589, 1179, 0]

const courses = [{ title: 'ES6' }, { title: 'React' }];
const titles = courses.map(c => c.title);
// ['ES6', 'React']

filter — keep matching items

const ebooks = [
  { title: 'Node', price: 499, free: false },
  { title: 'Intro JS', price: 0, free: true }
];
const freeBooks = ebooks.filter(b => b.free || b.price === 0);

find — first match

const user = users.find(u => u.email === 'alex@toolliyo.com');

reduce — single result

const orders = [{ total: 500 }, { total: 1200 }, { total: 300 }];
const revenue = orders.reduce((sum, o) => sum + o.total, 0);
// 2000
🌍 Real-world example — Dashboard: top free courses
const catalog = [
  { title: 'ES6 Basics', enrollments: 1200, free: true },
  { title: 'React Pro', enrollments: 800, free: false },
  { title: 'Node Chat', enrollments: 950, free: true }
];

const freeEnrollmentTotal = catalog
  .filter(c => c.free)
  .map(c => c.enrollments)
  .reduce((a, b) => a + b, 0);

console.log(freeEnrollmentTotal); // 2150
💡 Tip: Chain methods: filter → map → reduce. Read left to right as a pipeline.
⚠️ Common Mistake: Using map when you mean forEach — map builds a new array; if you ignore the return value, use forEach instead.
👨‍🏫 Teaching note: Live exercise: given 10 product objects, return names of items under ₹500 sorted by price — filter + map + sort.

Continue learning

Previous: Default Parameters & Object Shorthand

Next: for...of, Sets & Maps Essentials

Course home: All 12 lessons

Test your knowledge

Quizzes linked to this course—pass to earn certificates.

Browse all quizzes
Modern JavaScript (ES6+) for Beginners

On this page

map — transform each item filter — keep matching items find — first match reduce — single result Continue learning
Part 1 — Modern Basics
Introduction — Why ES6+ Before Node.js & React let, const & Block Scope Arrow Functions Explained
Part 2 — Write Less Code
Template Literals & Modern Strings Destructuring — Arrays & Objects Spread & Rest Operators (...)
Part 3 — Data & Collections
Default Parameters & Object Shorthand Array Methods — map, filter, find & reduce for...of, Sets & Maps Essentials
Part 4 — Async & Modules
Promises — then, catch & finally async/await & Fetch API Modules — import/export & What to Learn Next
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details