The Wayback Machine - https://web.archive.org/web/20240118171344/https://www.geeksforgeeks.org/lodash-_-lowerCase-method/
Open In App
Related Articles

Lodash _.lowerCase() Method

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

Lodash _.lowerCase() method is used to convert the given string to lowercase. The string can be space-separated, dash-separated, or can be separated by underscores.

Syntax:

_.lowerCase([string='']);

Parameters:

  • string: This parameter holds the string that needs to be converted into lowercase.

Return Value:

This method returns the lowercase string.

Example 1: In this example, we are using the _.lowerCase() method for converting the given string into lowercase.

Javascript




const _ = require('lodash');
 
let str1 = _.lowerCase("GEEKS FOR GEEKS");
console.log(str1);
 
let str2 = _.lowerCase("GFG--Geeks");
console.log(str2);


Output:

geeks for geeks
gfg geeks

Example 2: In this example, we are using the _.lowerCase() method for converting the given string into lowercase.

Javascript




const _ = require('lodash');
 
let str1 = _.lowerCase("GEEKS__FOR__GEEKS");
console.log(str1);
 
let str2 = _.lowerCase("G4G--geeks--GEEKS");
console.log(str2);
 
let str3 = _.lowerCase("GEEKS-----FOR_____Geeks");
console.log(str3);


Output:

geeks for geeks
g 4 g geeks geeks
geeks for geeks
Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks 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!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 20 Oct, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials