JavaScript toUpperCase | Method converts a string to uppercase letters

  • by

Using JavaScript toUpperCase() method you can convert a string to uppercase letters. This method does not change the original string. This method returns the string converted to uppercase.

console.log('alphabet'.toUpperCase()); // 'ALPHABET'

Example JavaScript toUpperCase

Simple example code.

<!DOCTYPE html>

    let text = "Hello World! toUpperCase";
    let result = text.toUpperCase();




JavaScript toUpperCase Method

Do comment if you have any doubts or suggestions on this JS basic method.

Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.

OS: Windows 10

Code: HTML 5 Version

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.