Program to accept Strings starting with a Vowel | Function to check if first character is vowel ; Function to check ; Driver code
function checkIfStartsWithVowels ( str ) { if ( ! ( str [ 0 ] == ' ' str [ 0 ] == ' ' str [ 0 ] == ' ' str [ 0 ] == ' ' str [ 0 ] == ' ' str [ 0 ] == ' ' str [ 0 ] == ' ' str [ 0 ] == ' ' str [ 0 ] == ' ' str [ 0 ] == ' ' ) ) return 1 ; else return 0 ; } function check ( str ) { if ( checkIfStartsWithVowels ( str ) ) document . write ( " " ) ; else document . write ( " " ) ; } var str = " " ; check ( str ) ; str = " " ; check ( str ) ;