Saturday, September 21, 2024
Google search engine
HomeLanguagesJavascriptLodash _.lowerFirst() Method

Lodash _.lowerFirst() Method

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--neveropen--GEEKS");
console.log(str2);
  
var str3 = _.lowerFirst("GEEKS-----FOR_____Geeks");
console.log(str3);


Output:

"gEEKS__FOR__GEEKS"
"g4G--neveropen--GEEKS"
"gEEKS-----FOR_____Geeks"
Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen 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!

RELATED ARTICLES

Most Popular

Recent Comments