Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How does javascript convert a string from uppercase to lowercase

Shulou Source: shulou.com Published: 2022-05-31 10:51:31 09月16日 Update

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.

Tags: Characters strings lowercase uppercase knowledge articles methods content syntax output different large functions most that is tutorials more formats environments computers Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Apple Shulou Information Shulou Tech Info MySQL