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.
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.|