Javascript - String toLocaleLowerCase() Method

The toLocaleLowerCase() method converts a string to lowercase letters, according to the host's current locale.

Description

The toLocaleLowerCase() method converts a string to lowercase letters, according to the host's current locale.

The locale is based on the language settings of the browser.

This method returns the same result as the toLowerCase() method normally.

For some locales, such as Turkish, the results may vary.

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

Syntax

string.toLocaleLowerCase()

Parameters

None

Return

A String, representing the value of a string converted to lowercase according to the host's current locale

Example

Convert the string to lowercase letters:

Demo

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

Result