Created
August 29, 2014 22:17
-
-
Save anonymous/7b58a770463299e32ac9 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
function sumar(parametro1, parametro){ | |
return parametro1 + parametro; | |
} | |
console.log(contarvocales("coderhouse")); | |
function contarvocales(string){ | |
var totaldevocales = 0; | |
for(var i = 0 ; i<string.length ; i =i+1){ | |
if (esvocal(string[i])) { | |
totaldevocales = totaldevocales +1; | |
} | |
} | |
return totaldevocales; | |
} | |
function esvocal(string){ | |
if (string == "a"||string == "e"||string == "i"||string == "o"||string == "u"){ | |
return true; | |
} | |
else{ | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment