Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isVowels(str) {
- const vowels = ['a', 'e', 'i', 'o', 'u']
- let count = 0
- for (let char of str.toLowerCase()) {
- if (vowels.includes(char)) {
- count++
- }
- }
- return count
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement