Advertisement
biswasrohit20

final final

Mar 13th, 2021
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. //silver
  2.  
  3. var text = prompt("What is Lance trying to say? ");
  4. var vowels = ["a","e","i","o","u"];
  5. for(var j = 0 ; j < text.length ; j ++){
  6. if (text[j] == "a" || text[j] == "e"|| text[j] == "i"|| text[j] == "o"|| text[j] == "u"){
  7. var o = "i";
  8. }
  9. else{
  10. var o = text[j];
  11. }
  12. console.log(o)
  13. }
  14.  
  15. //gold
  16.  
  17. var text = prompt("What is Lance trying to say? ");
  18. var vowels = ["a","e","i","o","u"];
  19. var output = ""
  20. for(var j = 0 ; j < text.length ; j ++){
  21. if ( text[j] == "a" || text[j] == "e"|| text[j] == "i"||text[j] == "o"|| text[j] == "u"){
  22. var o = "i";
  23. }
  24. else{
  25. var o = text[j];
  26. }
  27. output += o
  28. }
  29. console.log(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement