Home >Web Front-end >JS Tutorial >How to convert uppercase string to lowercase in javascript
In JavaScript, you can use the toLowerCase() method to convert an uppercase string to lowercase. This method can convert all uppercase characters in the string to lowercase characters. The syntax format is "string.toLowerCase()" .
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
In javascript, you can use the toLowerCase() function to convert uppercase strings to lowercase.
Let’s learn about it through an example:
var str="Hello World!" console.log(str.toLowerCase());
Output:
var str="HELLO WORLD!" console.log(str.toLowerCase());
Output:
Description:
toLowerCase() method is used to convert a string to lowercase. All uppercase characters in the string can be converted to Lowercase characters.
Syntax
stringObject.toLowerCase()
Return value
A new lowercase string.
[Related recommendations: javascript learning tutorial]
The above is the detailed content of How to convert uppercase string to lowercase in javascript. For more information, please follow other related articles on the PHP Chinese website!