題目說明:
函式帶入字串判斷有幾個母音(a,e,i,o,u)
code
export class Kata {
static getCount(str: string): number {
//code
const lowerCaseStr = str.trim().toLowerCase();
const regex = /[aeiou]/g;
const matches = lowerCaseStr.match(regex);
if (matches) {
return matches.length;
} else {
return 0;
}
}
}

![[html] 暗藏玄機的跨域連結 - link rel](https://static.coderbridge.com/img/vii120/af94399d4c2f4f168c0602b7c5f88ca8.jpg)
