Cyril Auburtin (2018-03-25T18:27:09.000Z)
cyril.auburtin at gmail.com (2018-03-26T19:02:46.623Z)
String and Array share a few methods. I think `repeat` could exist for Array as well At the moment, there are other more verbose ways to do so: - `Array.from({length: n}, () => 'foo')` - `Array(n).fill('foo')` - `[].concat(...Array.from({length: 3}, () => ['x', 'y']))` - `[].concat(...Array(3).fill(['x', 'y']))` so with repeat it would just be; - `['foo'].repeat(n)` - `['x', 'y'].repeat(3)`