Advanced Array Methods
Advanced array methods: map, filter, reduce, find, etc.
Example Data
const scrubResistance = [85, 92, 78, 96, 89, 73, 91, 88];
const expeditionMembers = [
{ nom: 'Gustave', resistance: 85, role: 'Engineer' },
{ nom: 'Maelle', resistance: 92, role: 'Explorer' },
{ nom: 'Lune', resistance: 78, role: 'Researcher' },
{ nom: 'Sciel', resistance: 96, role: 'Teacher' },
{ nom: 'Verso', resistance: 89, role: 'Mysterious' },
{ nom: 'Renoir', resistance: 73, role: 'Savior' },
{ nom: 'Monoco', resistance: 91, role: 'Gestral' }
];
1. MAP() - Transform Each Element
// Goal: Creates a new array by applying a function to each element
// WARNING: Does NOT modify the original array
const enhancedResistance = scrubResistance.map(resistance => resistance + 10);
console.log(