Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var chant = function(text){
- var vowels=['a','e','f','h','i','l','n','m','r','s','o','u','x'];
- var arr = text.split('');
- var output = "";
- for(var i = 0; i < arr.length; i++){
- var prefix = "a";
- if(vowels.indexOf(arr[i])>-1){
- prefix += "n";
- }
- output += "Give me " + prefix + " " + arr[i].toUpperCase() + ". ";
- }
- return output;
- }
- chant("ugur");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement