Exercise:
Convert the value of txt to lower case.
Hint
Hint: Use the toLowerCase() method.
Edit This Code:
See Result »
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var txt = "Hello World"; document.getElementById("demo").innerHTML = txt; </script> </body> </html>
Result:
Show Answer
Correct Code:
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var txt = "Hello World"; document.getElementById("demo").innerHTML = txt.toLowerCase(); </script> </body> </html>
Correct Result:
Hide Answer
Privacy Policy