Open xurxof opened 2 years ago
const withLength = miLista.filter(a => a.toLowerCase().includes("s")).length;
const withReduce = miLista.reduce((acc, curr) => acc + (curr.toLowerCase().includes("s") ? 1 : 0), 0);
// me parece más legible el uso del length
Buen trabajo! Un 2x1.
const withLength = miLista.filter(a => a.toLowerCase().includes("s")).length;
const withReduce = miLista.reduce((acc, curr) => acc + (curr.toLowerCase().includes("s") ? 1 : 0), 0);
// me parece más legible el uso del length