Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //silver
- var text = prompt("What is Lance trying to say? ");
- var vowels = ["a","e","i","o","u"];
- for(var j = 0 ; j < text.length ; j ++){
- if (text[j] == "a" || text[j] == "e"|| text[j] == "i"|| text[j] == "o"|| text[j] == "u"){
- var o = "i";
- }
- else{
- var o = text[j];
- }
- console.log(o)
- }
- //gold
- var text = prompt("What is Lance trying to say? ");
- var vowels = ["a","e","i","o","u"];
- var output = ""
- for(var j = 0 ; j < text.length ; j ++){
- if ( text[j] == "a" || text[j] == "e"|| text[j] == "i"||text[j] == "o"|| text[j] == "u"){
- var o = "i";
- }
- else{
- var o = text[j];
- }
- output += o
- }
- console.log(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement