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.”.
If you found this post useful you may also want to check these out:
