List.repeat
repeat($itemValue, $numItems) -> self
Description
Append a sequence of repeated items.
Note: The default method is a more memory-efficient alternative.
[].repeat(0, 5) //= [0, 0, 0, 0, 0] ['a', 'b'].repeat('x', 3) //= ['a', 'b', 'x', 'x', 'x']