toUpperCase, toLowerCase
Changing string case.
Examples
To Upper Case
Converting string to all uppercase.
let text1 = "Hello World!";
let text2 = text1.toUpperCase();
console.log(text2); // "HELLO WORLD!"To Lower Case
Converting string to all lowercase.
let text1 = "Hello World!";
let text2 = text1.toLowerCase();
console.log(text2); // "hello world!"Test Your Knowledge
JavaScript Quiz
No quiz available for this topic yet.