Capitalizes only the first letter of a string, leaving the rest unchanged.
A string to capitalize.
The string with its first letter capitalized.
capitalize('hello world'); // 'Hello world'capitalize('HELLO WORLD'); // 'HELLO WORLD' Copy
capitalize('hello world'); // 'Hello world'capitalize('HELLO WORLD'); // 'HELLO WORLD'
Capitalizes only the first letter of a string, leaving the rest unchanged.