How does javascript convert a string from uppercase to lowercase
Today, Xiaobian to share with you how to convert javascript strings to lowercase related knowledge points, detailed content, clear logic, I believe most people are still too familiar with this knowledge, so share this article for your reference, I hope you have some harvest after reading this article, let's learn about it together.
In javascript, you can convert an upper-case string to lowercase using the toLowerCase() method, which converts all upper-case characters in a string to lowercase, in the syntax format "string.toLowerCase()."
Operating environment of this tutorial: Windows 7 system, Javascript version 1.8.5, Dell G3 computer.
In javascript, you can use the toLowerCase() function to convert upper-case strings to lower-case.
Here are some examples:
var str="Hello World! "console.log(str.toLowerCase());
Output:
var str="HELLO WORLD! "console.log(str.toLowerCase());
Output:
Description:
The toLowerCase() method is used to convert a string to lowercase, converting all upper-case characters in the string to lowercase characters.
syntax
stringObject.toLowerCase()
return value
A new lowercase string.
The above is "javascript how to convert uppercase to lowercase string" all the content of this article, thank you for reading! I believe everyone has a great harvest after reading this article. Xiaobian will update different knowledge for everyone every day. If you want to learn more knowledge, please pay attention to the industry information channel.