Created
October 22, 2015 05:09
-
-
Save edinsoncs/b5ee09e1e087dd6283d1 to your computer and use it in GitHub Desktop.
Reverse
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
/*Reverse*/ | |
function familyReverse(hermanos, primos, tios, familia) { | |
var hermanos, primos, tios, familia; | |
var hermanos = new Array("edinson", "richard", "luis", "aslhy"); | |
var primos = new Array("Juan", "Adrean", "Albert", "Jherson"); | |
var tios = new Array("Adelino", "Alindor", "Eliseo", "Isidro") | |
var i = 0; | |
var t = prompt("Escribe solo una vocal"); | |
while(i < hermanos.length && i < primos.length && i < tios.length) { | |
if(t.length == 1) { | |
familia = "To Hermanos reverse: " + hermanos.reverse() +"----"+ "To Primos reverse: " + primos.reverse() +"----"+ "To Tios reverse: " +tios.reverse(); | |
console.log(familia); | |
} | |
else if(t.length == 2 || t.length == 3 || t.length == 4 || t.length == 5) { | |
console.log("Error Incorrecto Ingresastes: " + t.length + " vocales"); | |
} | |
else { | |
console.log("Atention: view description plz"); | |
} | |
i++ | |
} | |
return familia; | |
} | |
familyReverse(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment