JSFiddle - React, Tailwind, and code Playground
JavaScript
function isVowel(char) {
if (vowels.indexOf(char) >= 0) {
return "The character \""+char+"\" is a vowel.";
} else {
return "The character \""+char+"\" is NOT a vowel.";
}
}
var vowels = new Array('a','A','e','E','i','I','o','O','u','U');
alert(isVowel('e'));
alert(isVowel('f'));