1const name = 'flavio'
2const nameCapitalized = name.charAt(0).toUpperCase() + name.slice(1)
3
1const toCapitalCase = (string) => {
2 return string.charAt(0).toUpperCase() + string.slice(1);
3};
1var string = "A string";
2
3var upperCase = string.toUpperCase();
4console.log(upperCase); // -> A STRING
5
6var lowerCase = string.toLowerCase();
7console.log(lowerCase); // -> a string