JS: toUpperCase() method

The toUpperCase() method is member of class String. This function converts all the characters of a string into uppercase.

Advertisements

Here is an example program with output:

Advertisements
<!DOCTYPE html>
<html>
<head>
   <title>JavaScript:toUpperCase() method</title>
   <meta charset="utf-8">
</head>
<body>
<script>
   var myName = "Raju";

// convert to uppercase and display

   console.log(myName.toUpperCase());
//Output = RAJU
</script>
</body>
</html>

Output of the Above Program

RAJU

Advertisements

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.