The toLowerCase() function converts all alphabets in a string to lowercase. This function does not change the value of the original variable. Instead, the function creates a new line for the instance. Therefore, the function does not accept arguments, although the arguments are indicated in brackets (). But with the toLowercase() function you follow the same conventions as with the toLowercase() function.
Now let’s look at some examples.
Suppose there is a line that contains a few upper and lower case letters, such as the next line:
let str = Welcome to our LinuxHint.
But we have to convert the whole string to lowercase. So we just use this:
As you can see the string has been converted to a formatted string. All letters are now lowercase. It’s as simple as that.
This function is intended for the line. But it’s not just limited/limited. We can apply the function to a set of strings and even to a set of objects with strings.
Well, let’s see:
We will first write a series of strings as follows:
let arr = [Hey, LinuxHint, GREAT]
Now, to replace the term GRAND with all lowercase letters, we use the following :
where 2 is the GREAT clue.
As you can see the term BIG is now converted to lowercase. We did something similar for the other two channels:  for the term Hi and  for the term LinuxHint.
Now let’s see how we can apply this function to a series of objects where the objects contain a string, as follows
let arr = [name : [John], [name: [BOB], [name: [Ivan]
To convert the term BOB into all lowercase letters, we will change it as follows: