A RetroSearch Logo

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

Search Query:

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

Lodash _.stubString()Method - GeeksforGeeks

Lodash _.stubString()Method

Last Updated : 09 Sep, 2020

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
// Requiring the lodash library  
const _ = require("lodash");            
  
// Use of _.stubString() method 
// to create an empty String
let gfg = _.stubString(); 
      
// Printing the output  
console.log(gfg); 

Output :

""

Example 2:

JavaScript
// Requiring the lodash library  
const _ = require("lodash");            
  
// Use of _.stubString() method 
// to create 5 empty String
let gfg = _.times(5, _.stubString); 
      
// Printing the output  
console.log(gfg); 

Output :

["", "", "", "", ""]


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