In brief
The method returns a new string in lowercase letters.
Useful to know
toLowerCase() returns the text converted to lowercase. For example, "SOFIA".toLowerCase() gives "sofia". The original string does not change . [1]
In a simple search, you can compare separately converted values and save the original for display. This is not a universal linguistic sorting or removal of diacritics. For linguistically specific cases, there are other tools. The important thing is to define the rule of comparison, instead of every difference in the text being erased by habit in the constant data.
Sources
For further detail and to check the information: