xxxxxxxxxx
function changeToUpperCase(founder) {
return founder.toUpperCase();
}
// calling the function
const result = changeToUpperCase("Quincy Larson");
// printing the result to the console
console.log(result);
// Output: QUINCY LARSON
xxxxxxxxxx
const string = "A sTrInG";
const upperCase = string.toUpperCase();
console.log(upperCase); // -> A STRING
const lowerCase = string.toLowerCase();
console.log(lowerCase); // -> a string
xxxxxxxxxx
let str = "Hello World!";
let res = str.toUpperCase();
console.log(res) //HELLO WORLD!
xxxxxxxxxx
const upperCase = (string) => {
const newText = string.toUpperCase();
return newText;
};
xxxxxxxxxx
.toUpperCase()
// Like this:
alert("In upper case: " + "my string".toUpperCase()); // In upper case: MY STRING