Lodash _.stubString()Method
The Lodash _.stubString() method is used to create an empty string.
Syntax:
_.stubString()
Parameters: This method does not accept any parameter.
Return Value: This method returns an empty string.
Example 1:
Javascript
const _ = require( "lodash" );
let gfg = _.stubString();
console.log(gfg);
|
Output :
""
Example 2:
Javascript
const _ = require( "lodash" );
let gfg = _.times(5, _.stubString);
console.log(gfg);
|
Output :
["", "", "", "", ""]
Last Updated :
09 Sep, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...