Lodash _.capitalize() Method
The _.capitalize() method is used to convert the first character of string to upper case and the remaining to lower case.
Parameters: This method accepts single parameter as mentioned above and described below:
- string: This parameter holds the string that need to convert first character to upper case character and remaining to lower case characters.
Return Value: This method returns the capitalize string.
"Geeks__for__geeks" "Geeks for geeks" "Geeks--for--geeks"