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.
string.toUpperCase()
console.log('alphabet'.toUpperCase()); // 'ALPHABET'
Example JavaScript toUpperCase
Simple example code.
<!DOCTYPE html>
<html>
<body>
<script>
let text = "Hello World! toUpperCase";
let result = text.toUpperCase();
console.log(result)
</script>
</body>
</html>
Output:

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

Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.