I'm working on learning functional programming, and have been seeing a lot of arrow functions. The arrow functions I'm looking at are accessing arrays and objects and I'm trying to understand why the parameters and statements are singular versions of the array/object name while the actual name is plural? I'm adding a sample to show what I mean:
const users = [
{ name: 'John', age: 34 },
{ name: 'Amy', age: 20 },
{ name: 'camperCat', age: 10 }
];
const names = users.map(user => user.name);
console.log(names); // [ 'John', 'Amy', 'camperCat' ]
map()that iterate over arrays.users.map(function(user) ...)