revision:
The toLowerCase() method converts a string to lowercase letters. It does not change the original string.
string.toLowerCase()
Parameters: none
<p>toLowerCase() converts a string to lowercase letters:</p> <p id="demo"></p> <script> let text = "Hello World!"; let result = text.toLowerCase(); document.getElementById("demo").innerHTML = result; </script>
<div> <p id="local-1"></p> <p id="local-2"></p> </div> <script> let text = "Hello World!"; document.getElementById("local-1").innerHTML = "text : " + text; let result = text.toLowerCase(); document.getElementById("local-2").innerHTML = "text to lower case : " + result; </script>