Lodash _.repeat() Method
The _.repeat() method is used to repeat the given string n times.
Parameters: This method accepts two parameters as mentioned above and described below:
- string: This parameter holds the string to repeat.
- n: n is the number of times to repeat the string.
Return Value: This method returns the repeated string.