1const products = [
2 { name: 'Laptop', price: 32000, brand: 'Lenovo', color: 'Silver' },
3 { name: 'Phone', price: 700, brand: 'Iphone', color: 'Golden' },
4 { name: 'Watch', price: 3000, brand: 'Casio', color: 'Yellow' },
5 { name: 'Aunglass', price: 300, brand: 'Ribon', color: 'Blue' },
6 { name: 'Camera', price: 9000, brand: 'Lenovo', color: 'Gray' },
7];
8
9const productName = products.map(product => product.name);
10console.log(productName);
11//Expected output:[ 'Laptop', 'Phone', 'Watch', 'Aunglass', 'Camera' ]