xxxxxxxxxx
//toUpperCase is a string method that returns the uppercased version of a specified string.
// We will use this to capitalize the first letter:
const firstLetter = "f"
const firstLetterCap = firstLetter.toUpperCase()
// F
xxxxxxxxxx
const names = ['Ali', 'Atta', 'Alex', 'John'];
const uppercased = names.map(name => name.toUpperCase());
console.log(uppercased);
// ['ALI', 'ATTA', 'ALEX', 'JOHN']
xxxxxxxxxx
const string = "HeLLo woRld"
const uppercased = string.toUpperCase()
console.log(string)
// HeLLo woRld
console.log(uppercased)
// HELLO WORLD
xxxxxxxxxx
.toUpperCase()
// Like this:
alert("In upper case: " + "my string".toUpperCase()); // In upper case: MY STRING