toUpperCase()method does not affect the original string, returning a new modified string instead.
toUpperCase() function won't be modified. Instead, the method generates a new string with all letters properly capitalized.
var str = "Hi, Mark!"; var res = str.toUpperCase();
uppercaseFirstLetter to strings.
Tip: toLowerCase() method can be used for converting the string to lowercase letters.
Learn Standard Syntax
You should notice that parentheses are empty, meaning that it does not take any arguments.
|Return Value:||A string, which represents the original string with the letters all converted to uppercase.|