JavaScript en mayúsculas
var str = "Hello World!";
var res = str.toUpperCase(); //HELLO WORLD!
Batman
var str = "Hello World!";
var res = str.toUpperCase(); //HELLO WORLD!
const name = 'flavio'
const nameCapitalized = name.charAt(0).toUpperCase() + name.slice(1)
let str = "Hello World!";
let res = str.toUpperCase();
console.log(res) //HELLO WORLD!
const toCapitalCase = (string) => {
return string.charAt(0).toUpperCase() + string.slice(1);
};
var string = "A string";
var upperCase = string.toUpperCase();
console.log(upperCase); // -> A STRING
var 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