Categories
Medium Problems

โจทย์ข้อที่ MX0027

จงเขียนฟังก์ชั่น ที่รับค่า string และ ตัวอักษรแทน เข้าไป แล้วส่ง string ที่เกิดจาก นำ ตัวอักษรแทนนั้น ใส่แทนตัวอักษรสระ (a,e,i,o,u)

Examples

replaceVowels(“the aardvark”,’#’) ➞ “th# ##rdv#rk”

replaceVowels (“minnie mouse”,’?’) ➞ “m?nn?? m??s?”

replaceVowels (“shakespeare”,””) ➞ “shkspr”

Leave a Reply