A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/javascript/lodash-_-lowercase-method/ below:

Lodash _.lowerCase() Method - GeeksforGeeks

Lodash _.lowerCase() Method

Last Updated : 20 Oct, 2023

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: 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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4