In case we want to convert a string into the uppercase, we can use this approach.
<script> var txt = "hello friends!"; document.write(txt.toUpperCase()); </script>
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: 2143 | Post Order: 51