Converts the first character of string to upper case and the remaining to lower case.
string to convert
capitalized string
const result = capitalize('JOHN');console.log(result);// => 'John' Copy
const result = capitalize('JOHN');console.log(result);// => 'John'
Converts the first character of string to upper case and the remaining to lower case.