JavaScript toLocaleLowerCase() string method is used to convert a string to lowercase based on current locale. The locale is based on the language settings of the browser.
string.toLocaleLowerCase()
Note: It returns the same result as toLowerCase()
, except for locales that conflict with the regular Unicode case mappings (such as Turkish).This method does not change the original string.
JavaScript toLocaleLowerCase()
Simple example code.
<!DOCTYPE html>
<html>
<body>
<script>
const city = 'GESÄSS';
console.log(city.toLocaleLowerCase('en-US'));
console.log(city.toLocaleLowerCase('TR'));
</script>
</body>
</html>
Output:
Do comment if you have any doubts or suggestions on this Js array method tutorial.
Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.
OS: Windows 10
Code: HTML 5 Version