Convert string to upperCase with .upperCase()

.upperCase();


Description:Convert string to lowercase. If value is not of type string, the value will be cast as a "String" before converted to upperCase value.


Example:

    <!doctype html>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <title>upperCase demo</title>
      <script src="http://code.bitsycode.com/bitsycode-latest.min.js"></script>
    </head>
    <body>
      
      <div class="content-container">this text will be set to upperCase</div><br /><br />
      <button onclick="convertUpper()">Convert to UpperCase</button>
      
      <script type="text/javascript">
         
         function convertUpper() {
            var content = bitsyCode(".content-container").text();
            var converted = bitsyCode.upperCase(content);
            bitsyCode(".content-container").text(converted);
         }
         
      </script>
     
    </body>
    </html>

Preview:

this text will be set to upperCase

  • Usage

    • How to use:

      Convert string to UpperCase.

    • USAGE:

      bitsyCode.upperCase("content");
  • Options

    • What options are there:

      There are no options for this method.

  • Returns

    • Returns: A string converted to uppercase will be returned.
Share