Categories
Medium Problems

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

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

Examples

countVowels(” celebration”) ➞ 5

countVowels (“palm”) ➞ 1

countVowels (“prediction”) ➞ 4

Leave a Reply