Reto 4 #18

Open
opened 2022-03-13 21:56:01 +01:00 by xurxof · 1 comment
xurxof commented 2022-03-13 21:56:01 +01:00 (Migrated from github.com)

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

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 2022-03-14 12:47:19 +01:00 (Migrated from github.com)

Buen trabajo! Un 2x1.

Buen trabajo! Un 2x1.
Sign in to join this conversation.