const names = ['Ali', 'Atta', 'Alex', 'John'];
const lowercased = names.map(name => name.toLowerCase());
console.log(lowercased);
// ['ali', 'atta', 'alex', 'john']
const uppercased = names.map(name => name.toUpperCase());
console.log(uppercased);
// ['ALI', 'ATTA', 'ALEX', 'JOHN']
var a = ['this','is','test'];
a.map(f=>{ return f.toUpperCase(); });
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!
["Foo", "bar"].sort(Intl.Collator().compare); //["bar", "Foo"]