This method returns the calling string value converted to uppercase.
Its syntax is as follows −
string.toUpperCase( )
Returns a string representing the specified object.
Try the following example.
<html> <head> <title>JavaScript String toUpperCase() Method</title> </head> <body> <script type="text/javascript"> var str = "Apples are round, and Apples are Juicy."; document.write(str.toUpperCase( )); </script> </body> </html>
APPLES ARE ROUND, AND APPLES ARE JUICY.