Capitalize the first character of a string and lowercase the rest.
The string to capitalize.
The capitalized string. An empty string is returned unchanged.
capitalize('hELLO') // => 'Hello'capitalize('world') // => 'World' Copy
capitalize('hELLO') // => 'Hello'capitalize('world') // => 'World'
Capitalize the first character of a string and lowercase the rest.