It will convert the first character of the string to uppercase and the remaining to lowercase.
string
1.0.0
capitalize('fred');// => 'Fred' Copy
capitalize('fred');// => 'Fred'
capitalize('FRED');// => 'Fred' Copy
capitalize('FRED');// => 'Fred'
capitalize('frED');// => 'Fred' Copy
capitalize('frED');// => 'Fred'
It will convert the first character of the
string
to uppercase and the remaining to lowercase.