Home » JavaScript String toUpperCase() Method

JavaScript String toUpperCase() Method

by Online Tutorials Library

JavaScript String toUpperCase() Method

The JavaScript string toUpperCase() method is used to convert the string into uppercase letter. This method doesn’t make any change in the original string.

Syntax

The toUpperCase() method is represented by the following syntax:

Return

String in uppercase letter.

JavaScript String toUpperCase() Method Example

Let’s see some simple examples of toUpperCase() method.

Example 1

Here, we will print the string in uppercase letter.

Test it Now

Output:

TUTORASPIRE  

Example 2

This is one more example to print the string in uppercase letter.

Test it Now

Output:

TUTORASPIRE TUTORIALS  

Next TopicJavaScript String

You may also like