![]() |
VOOZH | about |
The toUpperCase() method is used to convert all letters in a string to uppercase. It helps standardize text for comparison or display.
str.toUpperCase()This method does not accept any parameter.
The toUpperCase() method returns a modified version of the original string. It creates a new string with all letters converted to uppercase.
[Example 1]: In this example, we are converting the given string to uppercase.
[Example 2]: In this example, the method toUpperCase() converts all the lower case alphabets to their upper case equivalents without affecting the special characters and the digits.
[Example 3]: In this example, we are creating an array of data with elements 'javascript', 'html', and 'css'. It uses map() and toUpperCase() to convert each element to uppercase.