JavaScript string object introduction instance of the toLowerCase method (for converting letters toLowerCase)

  • 2020-03-30 04:09:30
  • OfStack

JavaScript toLowerCase method

The toLowerCase method is used to convert (English) strings toLowerCase and return the converted string. The syntax is as follows:


str_object.toLowerCase()

Example of the toLowerCase method


<script language="JavaScript">
var str = "AaBbCc";
alert( str.toLowerCase() );
</script>

Run the example and a prompt pops up with aabbcc

ToLocaleLowerCase method

The toLocaleLowerCase method is basically the same as toLowerCase, which converts strings toLowerCase locally. Only a few languages, such as Turkish, have locally-specific case mappings.


Related articles: