1var string = "To Upper Case";
2console.log(string.toUpperCase()); // TO UPPER CASE
1const str = 'flexiple';
2const str2 = str.charAt(0).toUpperCase() + str.slice(1);
3console.log(str2);
4
5//Output: Flexiple
6
7const str = 'abc efg';
8const str2 = str.charAt(0).toUpperCase() + str.slice(1);
9console.log(str2);
10
11//Output: Abc efg