-
-
Save parzibyte/4d8eea0e3686e178532dbe8ff58880db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const contarVocales = palabra => { | |
// https://parzibyte.me/blog | |
const vocales = "aáeéiíoóuú"; | |
let cantidadVocales = 0; | |
for (const letra of palabra) { | |
if (vocales.includes(letra.toLowerCase())) { | |
cantidadVocales++; | |
} | |
} | |
return cantidadVocales; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment