Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sohana08/94673df5bb1264d5eb0c34f25e140960 to your computer and use it in GitHub Desktop.
Save sohana08/94673df5bb1264d5eb0c34f25e140960 to your computer and use it in GitHub Desktop.
i want to check whether a character of a string is a vowel or not but i dont have any idea of it. following is code i have tried of.
<script>
function checkStr(string1)
{
var vowel_list='aeiouAEIOU';
for(var i=0;i<string1.length;i++)
{
if(string1[i]!==vowel_list
{
return false;
}
else
{
return true;
}
}
}
document.write(checkStr("This is the string");
</script>
@sohana08
Copy link
Author

needed help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment