destructuing map() array code example
Example: array map destructuring
var arr = [
{ name: "Anuja", from: "Saurav" },
{ name: "Saurav", from: "Anuja" },
{ name: "All", from: "All" },
];
arr.map(({ name, from }) => console.log(name, from));
var arr = [
{ name: "Anuja", from: "Saurav" },
{ name: "Saurav", from: "Anuja" },
{ name: "All", from: "All" },
];
arr.map(({ name, from }) => console.log(name, from));