What will be the result of the following code?
const products = [
{ name: 'Laptop', price: 1000 },
{ name: 'Smartphone', price: 500 }
];
const expensive = products.filter(product => product.price >= 1000);
console.log(expensive[0].name);
What will be the result of the following code?
const products = [
{ name: 'Laptop', price: 1000 },
{ name: 'Smartphone', price: 500 }
];
const expensive = products.filter(product => product.price >= 1000);
console.log(expensive[0].name);