String Methods
String Methods
Here we will see some of the popular methods we can use with strings.
length(): This method is used to find the length of a string.
Example:
Output:
indexOf(): This method returns the first occurrence of a specified character or text in a string.
Example:
Output:
toLowerCase(): Converts string to lower case characters.
Example:
Output:
toUpperCase(): Converts string to upper case characters.
Example:
Output: