const products = [
    { name: "gold star", price: 20 },
    { name: "mushrooms", price: 40 },
    { name: "green shells", price: 35 },
    { name: "banana skin", price: 45 },
    { name: "red shells", price: 4 }
];
// const filtered = products.filter(product => { return product.price > 20 })
// const promos = filtered.map(product => { return `the ${product.name} is ${product.price / 2} euros` })
// console.log(promos)

// das Gleiche als der Beispiel oben
const promos = products
    .filter(product => { return product.price > 20 })
    .map(product => { return `the ${product.name} is ${product.price / 2} euros` });
console.log(promos)