// Requiring the lodash library const _ =require("lodash");// Use of _.stubString() method // to create an empty Stringlet gfg = _.stubString();// Printing the output
console.log(gfg);
Javascript
// Requiring the lodash library const _ =require("lodash");// Use of _.stubString() method // to create 5 empty Stringlet gfg = _.times(5, _.stubString);// Printing the output
console.log(gfg);
输出 :
""
示例 2:
Javascript
// Requiring the lodash library const _ =require("lodash");// Use of _.stubString() method // to create 5 empty Stringlet gfg = _.times(5, _.stubString);// Printing the output
console.log(gfg);