Categories
Medium Problems

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

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

Examples

firstVowel(“apple”) ➞ 0

firstVowel (“hello”) ➞ 1

firstVowel (“strawberry”) ➞ 3

Leave a Reply