1var fruits = ["Banana", "Orange", "Apple", "Mango"];
2undefined
3string = fruits.join(' ').toUpperCase();
4// Output"BANANA ORANGE APPLE MANGO"
1var string = "A string";
2
3var upperCase = string.toUpperCase();
4console.log(upperCase); // -> A STRING
5
6var lowerCase = string.toLowerCase();
7console.log(lowerCase); // -> a string
1const names = ['Ali', 'Atta', 'Alex', 'John'];
2
3const uppercased = names.map(name => name.toUpperCase());
4
5console.log(uppercased);
6
7// ['ALI', 'ATTA', 'ALEX', 'JOHN']