firstUpperCase
Converts the first character of a string to uppercase.
Parameters
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
str | string | false | The string to uppercase first character. |
Returns
Example
var str = "hello world";
console.log(firstUpperCase(str)); // "Hello world"
console.log(str); // "hello world"