Javascript convert string to LowerCase and UpperCase example

string.toLowerCase() method converts a string to uppercase letters.
<script type="text/javascript">
     var str="CONVERT THIS TEXT TO LOWERCASE";
     alert(str.toLowerCase());
</script>
string.toUpperCase() method converts a string to uppercase letters.
<script type="text/javascript">
     var str="Convert this text to uppercase";
     alert(str.toUpperCase());
</script>

No comments:

Post a Comment

NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.