Lodash _.toLower() Method

The _.toLower() method is used to convert the entire string to lower case. This function does not affect any of the special characters, digits, and the alphabets that are already in the lower case.
Syntax:
_.toLower( [string = ''])
Parameters: This method accepts a single parameter as mentioned above and described below:
- string: This parameter holds the string to convert.
Return Value: This method returns the lower case string.
Below examples illustrate the Lodash _.toLower() method in JavaScript:
Example 1:
Javascript
| // Requiring the lodash library   const _ = require("lodash");         // Use of _.toLower() method  console.log(_.toLower('Geeks-For-Geeks'));  console.log(_.toLower('#--GeeksForGeeks--#'));   | 
Output:
'zambiatek-for-zambiatek' '#--zambiatek--#'
Example 2:
Javascript
| // Requiring the lodash library   const _ = require("lodash");    //  Given string      let str = "Hello Geeks!";  // Use of _.toLower() method  console.log(_.toLower(str));   | 
Output:
'hello zambiatek!'
Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, zambiatek Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
 
				 
					


