Helping ordinary people create extraordinary websites!

Converting to Lower Case and Upper Case in JavaScript

By Amrit Hallan
2005-10-19

Converting to lower case and upper case in JavaScript

To convert a string to lower case in JavaScript we use the following steps:

var sometext=”This is some text.”;
var casechanged=sometext.toLowerCase();

Now the variable casechanged contains “this is some text.”. For upper case in JavaScript:

var sometext=”This is some text.”;
var casechanged=sometext.toUpperCase();

Now the variable casechanged contains “THIS IS SOME TEXT.”.





Tutorial pages:
  • Converting to lower case and upper case in JavaScript
 12 Votes

You might also want to check these out:


Leave a Comment on "Converting to Lower Case and Upper Case in JavaScript"
You must be logged in to post a comment.

Link to This Tutorial Page!


GET OUR NEWSLETTERS