Replace Vowels

Published by mukeshgurpude in

Write a function that replaces all vowels in a string with a specified vowel.

Examples

vowReplace("apples and bananas", "u") ➞ "upplus und bununus"

vowReplace("cheese casserole", "o") ➞ "chooso cossorolo"

vowReplace("stuffed jalapeno poppers", "e") ➞ "steffed jelepene peppers"

Notes

  • All words will be lowercase.
  • "Y" is not considered a vowel.
Watch a quick demo on how Edabit works.