Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Lodash _.lowerFirst() Method

  • Last Updated : 07 Sep, 2020

The _.lowerFirst() method is used to convert the first character of the given string into lower case characters.

Syntax:

_.lowerFirst([string=''])

Parameters: This method accepts single parameter as mentioned above and described below:

  • string: This parameter holds the string that need to convert.

Return Value: This method return the converted string.

Example 1:

Javascript




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

Output:

"gEEKS FOR GEEKS"
"gFG--Geeks"

Example 2:

Javascript




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

Output:

"gEEKS__FOR__GEEKS"
"g4G--geeks--GEEKS"
"gEEKS-----FOR_____Geeks"
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!