Horje
What is toLowerCase() Method in JavaScript ?

Javascript str.toLowerCase() method converts the entire string to lowercase. This method does not affect any of the special characters, digits, and the alphabet that is already in lowercase.

Syntax:

str.toLowerCase();

Example: Here, the toLowerCase() method is called on the str string, converting all uppercase letters to lowercase. The resulting string, "hello world", is assigned to the variable lowerStr.

Javascript

const str = "HELLO WORLD";
const lowerStr = str.toLowerCase();
 
console.log(lowerStr); // Output: "hello world"

Output

hello world



Reffered: https://www.geeksforgeeks.org


JavaScript

Related
How to Convert a String to Uppercase in JavaScript ? How to Convert a String to Uppercase in JavaScript ?
What is hasOwnProperty() method in JavaScript ? What is hasOwnProperty() method in JavaScript ?
How to Lowercase a String in JavaScript ? How to Lowercase a String in JavaScript ?
What is includes() Method in JavaScript ? What is includes() Method in JavaScript ?
What is endsWith() Method in JavaScript ? What is endsWith() Method in JavaScript ?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
11