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