The JavaScript ToUpperCase method is used to convert the given string into Uppercase letters. The syntax of the ToUpperCase function is:
String_Object.ToUpperCase()
JavaScript ToUpperCase Example
The following set of examples will help you understand the JavaScript ToUpperCase Function.
<!DOCTYPE html> <html> <head> <title> Java Script ToUpperCase </title> </head> <body> <h1> JavaScript ToUpperCase </h1> <script> var Str1 = "Learn JavaScript at Tutorial Gateway"; var Str3 = Str1.toUpperCase(); var Str4 = "Hi, This is From JS".toUpperCase(); var Str5 = "javascript uppercase".toUpperCase(); document.write(" <b> Uppercase Letters are: </b> " + Str3); document.write(" <br \> <b> Uppercase Letters are: </b> " + Str4); document.write(" <br \> <b> Uppercase Letters are: </b> " + Str5); </script> </body> </html>