Have the function letter changes (str) takes the str parameter being passed and modify it using the following algo. Replace evry letter in the string with the letter followoing in the alphabate (i.e c becomes d , z becomes a, ).the capitalize evry vowel in this new string (a,e,i,o,u) and finally return this modified string. Example- input: hello*3"
Output- lfmmp*3
Answers
Answered by
2
Answer:
Your problem isn't that toUpperCase() isn't working, it's that your code never gets to that point.
Your
if (al.charAt(al.indexOf(str.charAt(i))+1) == vo.charAt(vo.indexOf(str.charAt(i))))
never passes, because of that +1. There's no need for that there, and if you remove it, uppercase vowels will appear. There are other problems with your code beyond that point, but I'll let you solve them as part of the challenge :-)
Please follow me.
Similar questions