JSFiddle - React, Tailwind, and code Playground

by hescano

JavaScript

function getCount(str) {
  return str.split('').filter(function(a) { return a === "a" || a === "e" || a === "i" || a === "o" || a === "u"}).length;
}

alert(getCount("abraceasasaiadabra"))