JavaScript String toLowerCase() Method

Last updated on February 20, 2023

In JavaScript, the toLowerCase() method converts the string into lowercase. It doesn’t accept any parameter and can be accessed through dot notation.

Syntax

anyTextOrString.toLowerCase()

Parameter

It doesn’t accept any parameter.

Example 1

Create a string that should contain an uppercase value.

"BLACK"

Next, attach the toLowerCase() method to convert it into lowercase.

"BLACK".toLowerCase();
// Output: black

In this example, the toLowerCase() method is attached to the string that converts the value into lowercase.

To print the converted value in the console, you can use the console.log() function.

console.log("BLACK".toLowerCase());


Written by
I am a skilled full-stack developer with extensive experience in creating and deploying large and small-scale applications. My expertise spans front-end and back-end technologies, along with database management and server-side programming.

Share on:

Related Posts