tanrax / soy-un-buen-programador-js

Juego con retos sencillos de JavaScript para probarte a ti mismo que sabes lo que haces
11 stars 2 forks source link

Reto 4 #18

Open xurxof opened 2 years ago

xurxof commented 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

tanrax commented 2 years ago

Buen trabajo! Un 2x1.