The map() method creates a new array by transforming each object. Use it to extract specific properties or reshape data.
const users = [
{ name: "Alice", age: 25 },
{ name: "Bob", age: 30 }
];
const names = users.map(u => u.name);
// ["Alice", "Bob"]
You transformed an array of objects into an array of strings.