Loop the string to mark the vowels which are present
for ( var i = 0 ; i < str . length ; i ++ ) { if ( str [ i ] == ' ' str [ i ] == ' ' ) hash [ 0 ] = 1 ; else if ( str [ i ] == ' ' str [ i ] == ' ' ) hash [ 1 ] = 1 ; else if ( str [ i ] == ' ' str [ i ] == ' ' ) hash [ 2 ] = 1 ; else if ( str [ i ] == ' ' str [ i ] == ' ' ) hash [ 3 ] = 1 ; else if ( str [ i ] == ' ' str [ i ] == ' ' ) hash [ 4 ] = 1 ; }