Uppercasing and Lowercasing Characters of a String




string.toUpperCase() and string.toLowerCase()
var stringName = "hOwdY"

stringName.toUpperCase()
// result is "HOWDY"

stringName.toLowerCase()
// result is "howdy"
The first function "toUpper()", takes the value of the text input and converts it to uppercase using the toUpperCase() method.

The second function, "toLower()" takes the value of the text input and converts it to lowercase using the toLowerCase() method.

View the Source


 


View Source | Home | Contact