The value to be repeated
An integer between 0 and +Infinity, indicating the number of times to repeat the string.
A new string containing the specified number of copies of the given string.
RangeError: repeat count must be non-negative.
RangeError: repeat count must be less than infinity and not overflow maximum string size.
The
strRepeat()
method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.