JavaScript toUpperCase method
The toUpperCase method is used to convert (English) strings to uppercase and return the converted string. The syntax is as follows:
The code copy is as follows:
str_object.toUpperCase()
toUpperCase method example
The code copy is as follows:
<script language="JavaScript">
var str = "AaBbCc";
document.write( str.toUpperCase() );
</script>
Run this example and output:
The code copy is as follows:
AABBCC
toLocaleUpperCase method
The toLocaleUpperCase method toUpperCase is basically the same. ToLocaleUpperCase converts strings to uppercase in the local way. Only a few languages (such as Turkish) have locally unique case mappings.