Program to accept String starting with Capital letter | Function to check if first character is Capital ; Function to check ; Driver function
function checkIfStartsWithCapital ( str ) { if ( str [ 0 ] >= ' ' && str [ 0 ] <= ' ' ) return 1 ; else return 0 ; } function check ( str ) { if ( checkIfStartsWithCapital ( str ) ) document . write ( " " ) ; else document . write ( " " ) ; } var str = " " ; check ( str ) ; str = " " ; check ( str ) ;