2019-02-26 Daily Challenge

What I've done today is Vowel Count in JavaScript.

CodeWars

Problem

Vowel Count

Return the number (count) of vowels in the given string.

We will consider a, e, i, o, and u as vowels for this Kata.

The input string will only consist of lower case letters and/or spaces.

Solution

function getCount(str) {
  return (str.match(/[aeiou]/gi)||[]).length;
}

function getCount(str) {
  return str.replace(/[^aeiou]/gi, "").length;
}