Returns a fixed list of size n containing a specified identical value.
n
repeat(5, 'hi'); //=> ['hi', 'hi', 'hi', 'hi', 'hi'] var obj = {}; var repeatedObjs = repeat(5, obj); //=> [{}, {}, {}, {}, {}] repeatedObjs[0] === repeatedObjs[1]; //=> true
The desired size of the output list.
A new array containing n values.
value
Generated using TypeDoc
Returns a fixed list of size
n
containing a specified identical value.