toLowerCase()method does not affect the original string. Instead, it generates a new modified string (with all lowercase letters).
toLowerCase() Method Explained
toLowerCase() function implements its task by replacing uppercase letters with lowercase ones.
var str = "Hi, Mark!"; var res = str.toLowerCase();
Tip: the toUpperCase() method can be used for converting letters to uppercase.
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid certificates of completion
- Great user experience
- Offers quality content
- Very transparent with their pricing
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
Learn Proper Syntax
Other Technical Details: Return Value
toLowerCase() function will generate a clear return value. It will show a string in which all uppercase letters are converted to lowercase. As we have mentioned before, the string will be new, and the capitalization of the original one will stay as it was.
|Return Value:||A string, which represents the original string with the letters all converted to lowercase.|