JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<body>
<p>Enter text and Click the button to display the vowel count</p>
<input type="text" id="text" />
<button onclick="myFunction(document.getElementById('text').value)">Try it</button>
<p id="demo"></p>
<script>
function myFunction(text) {
document.getElementById("demo").innerHTML='';
var str = text.toLowerCase();
var arr=['a','i','o','e','u'];
for(i=0;i<arr.length;i++)
{
document.getElementById("demo").innerHTML+= arr[i]+" Found "
+ ((str.split(arr[i]).length)-1)+"<br/>";
}
}
</script>
</body>
</html>