How To Use String Object ToUpparCase In JavaScript

In this article I am going to explain about String Object ToupperCase In JavaScript.
  • 1380

Use toUpperCase() method in JavaScript

ToUpperCase() method is converts all string in uppercase.

This method return a new string value in uppercase.

The toUpperCase() method has no effect on nonalphabetic characters.

All browsers support string object toUpparCase() method.

Syntax

string.toUpperCase()

Example

<!DOCTYPE html>

<html>

<body style ="background-color :Red">

 

<script type="text/javascript">

 

    var txt = "Welcome dotnetheaven!";

    document.write(txt.toLowerCase() + "<br /><br />");

    document.write(txt.toUpperCase());

 

</script>

 

</body>

</html>

Output1

 op1.jpg

Further Readings

You may also want to read these related articles :here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.