Also called: map, filter, reduce, find, forEach, sort
Example
filter keeps the paid bookings, and reduce adds up their totals.
In code
const paid = bookings.filter(b => b.status === 'paid');
const names = paid.map(b => b.guest);
const revenue = paid.reduce((sum, b) => sum + b.total, 0);
bookings.find(b => b.id === 7);
bookings.some(b => b.nights > 14);
[...names].sort((a, b) => a.localeCompare(b));
Learn more
Related terms
Added 2026-11-30 · Last reviewed 2026-11-30