JavaScript toUpperCase()

📔 : Java Script 🔗

toUpperCase() method String को uppercase letters में convert करता है। हालाँकि यह original String में कोई changes नहीं करता है।

Important
String को lowercase में convert करने के लिए toLowerCase() method use करते हैं।


JavaScript toUpperCase Syntax

string.toUpperCase()

Parameters
  1. string | required : यह String variable है जिसे आप uppercase letters में convert करना चाहते हैं।

  2. Return Value : String को uppercase letters में convert करके return करता है।

JavaScript toUpperCase Example

File : js_toUpperCase.html

CopyFullscreenClose FullscreenRun
<!DOCTYPE html>
<html>
  <body>
    <script>
      let str = "Hello world!.";
      document.write(str.toUpperCase());
      document.write("<br> Original String: " + str);
    </script>
  </body>
</html>
Output
HELLO WORLD!.
Original String: Hello world!.

Related Topics :

Rahul Kumar

Rahul Kumar

Hi ! I'm Rahul Kumar Rajput founder of learnhindituts.com. I'm a software developer having more than 4 years of experience. I love to talk about programming as well as writing technical tutorials and blogs that can help to others. I'm here to help you navigate the coding cosmos and turn your ideas into reality, keep coding, keep learning :)

Get connected with me. :) LinkedIn Twitter Instagram Facebook