toUpperCase
ExamplesΒΆThe general syntax for this method is:
stringName.toUpperCase();
This method returns a copy of stringName
with all lowercase letters replaced by their uppercase counterparts. It leaves non-alphabetic characters unchanged.
Example
1console.log("LaunchCode".toUpperCase());
2console.log("launchcode".toUpperCase());
3console.log("LaunchCode's LC101".toUpperCase());
Output
LAUNCHCODE
LAUNCHCODE
LAUNCHCODE'S LC101