Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Checking if the first letter of the string is uppercase

   if (this.state.name[0] >= 'A' && this.state.name[0] <= 'Z')
      this.setState({ name: "First letter is uppercase" })
    else
      this.setState({ name: "First letter is NOT uppercase" })
  }
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #Checking #letter #string #uppercase
ADD COMMENT
Topic
Name
2+1 =