javascript en majuscules
var str = "Hello World!";
var res = str.toUpperCase(); //HELLO WORLD!
Batman
var str = "Hello World!";
var res = str.toUpperCase(); //HELLO WORLD!
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
.toUpperCase()
// Like this:
alert("In upper case: " + "my string".toUpperCase()); // In upper case: MY 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