JS: toLowerCase() Method

In JavaScript programming, sometimes you wish to change the characters of a string to lowercase. You can do this with the help of toLowerCase() method of JavaScript class String.

Here is the example program in which a string in uppercase is converted to lowercase using toLowerCase() method.

<!DOCTYPE html>
   <meta charset="utf-8">
  var name = "PETER PAN";
//convert the name into a lowercase 

console.log(name.toLowerCase();");//output = peter pan

Output of the above program

peter pan

Please support us by disabling your adblocker or whitelist this site from your adblocker. Thanks!

turn of adblocker imag