1 1 Vote

JavaScript: Convert String to Lowercase Letters

Info by Progger99 | 29/03/2012 at 13:57

This example converts a string consisting of uppercase and lowercase letters to a string that is written in lower letters completely:

var str = "AbC DEf gH";
str = str.toLowerCase();
alert(str);
// Output is: "abc def gh"

With the function toLowerCase() you are able to convert all characters of a string to their lowercase equivalents, like it is shown in the example.

ReplyPositiveNegative

Computer Expert

Show Profile | Message
Avatar
00 Votes

And if you want to go the other way, you can simply use the function toUpperCase() instead of toLowerCase(). This makes all characters in the string uppercase.
04/02/2020 at 23:01

ReplyPositive Negative
Reply

About the Author

Avatar AuthorThe author has not added a short description to his profile yet.
Show Profile | Message

 

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own articles on askingbox.com. How to do.