O'Reilly logo

jQuery and JavaScript Phrasebook by Brad Dayley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing String Case

var s1 = "jQuery and JavaScript"; var s2  = s1.toLowerCase();  //s2 = "jquery & javascript" var s3  = s1.toUpperCase(); //s3 = "JQUERY & JAVASCRIPT"

Strings have built-in functions to change the case. The .toLowerCase() method returns a lowercase version of the string. The .toUpperCase() method returns an uppercase version of the string.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required