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.
- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion
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.|