JavaScript String repeat()
JavaScript String repeat()
The repeat() method is used to return a string with a number of copies of a string. Each time it will return numbers of new strings and it will not change the original string.
Syntax:-
Its syntax is:- string.repeat(count)
Return:-
Its return is:- copies of the original string
Further Explanation:-
Parameter | Description |
count | Required. The number of copies. |