Skip to content

Commit 9776905

Browse files
committed
vowels.js
1 parent 6fe28ab commit 9776905

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vowels.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
function vowels(str) {
2+
const matches = str.match(/[aeiou]/gi);
3+
return matches ? matches.length : 0;
4+
}

0 commit comments

Comments
 (0)