JavaScript > Methods

Upper case in JavaScript

How to convert string into upper case in JavaScript?

In case we want to convert a string into the uppercase, we can use this approach.

        var txt = "hello friends!";

In the above code snippet, we have written “hello friends!” in small letters (Lower case) as variable text and in document.write we have called the text toUpperCase() method. This method convert the variable text which is written in lowercase into uppercase, that can be shown clearly in the below output.


 Views: 672 | Post Order: 51

Write for us