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 <span style="color:#a30000" class="tadv-color">toLowerCase()</span> method of JavaScript class String.

Advertisements
Advertisements

Here is the example program in which a string in uppercase is converted to lowercase using <span style="color:#a31800" class="tadv-color">toLowerCase() </span>method.

<!DOCTYPE html>
<html>
<head>
   <title>JavaScrtipt:toLowerCase()</title>
   <meta charset="utf-8">
</head>
<body>
<script>
  var name = "PETER PAN";
//convert the name into a lowercase 

console.log(name.toLowerCase();");//output = peter pan
</script>
</body>
</html>

Output of the above program

peter pan
Advertisements

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Exit mobile version