Javascript - String toLowerCase() Method

The toLowerCase() method converts a string to lowercase letters.

Description

The toLowerCase() method converts a string to lowercase letters.

The toLowerCase() method does not change the original string.

Syntax

string.toLowerCase()

Parameters

None

Return

A String, representing the value of a string converted to lowercase

Example

Convert the string to lowercase letters:

Demo

//convert the string to lowercase letters.
var str = "Hello World!";
var res = str.toLowerCase();
console.log(res);//from   w  w  w . j a va  2s.c  o  m

Result