A string is converted to upper case with toUpperCase()
:
Example
var text1 = "Hello World!"; // String
var text2 = text1.toUpperCase(); // text2 is text1 converted to upper
var text2 = text1.toUpperCase(); // text2 is text1 converted to upper
A string is converted to lower case with toLowerCase()
:
Example
var text1 = "Hello World!"; // String
var text2 = text1.toLowerCase(); // text2 is text1 converted to lower
var text2 = text1.toLowerCase(); // text2 is text1 converted to lower
Practice Excercise Practice now