str.toLowerCase()
str.toUpperCase()
const string = "A string";
const upperCase = string.toUpperCase();
console.log(upperCase); // -> A STRING
const lowerCase = string.toLowerCase();
console.log(lowerCase); // -> a string
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
var fruits = ["Banana", "Orange", "Apple", "Mango"];
undefined
string = fruits.join(' ').toUpperCase();
// Output"BANANA ORANGE APPLE MANGO"
let myGreeting = 'Hey there!';
console.log(myGreeting.toLowerCase());
//output
//hey there!
const upperCase = (string) => {
const newText = string.toUpperCase();
return newText;
};
const str = "This is a very long string!";
// This will return => "THIS IS A VERY LONG STRING!"
console.log(str.toUpperCase());