We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Repeats an array given times. 🏃 📼 📦 🌔 📒
Similar: repeat, cycle.
array.repeat(x, [n]); // x: an array // n: times (1)
const array = require('extra-array'); var x = [1, 2]; array.repeat(x, 2); // [ 1, 2, 1, 2 ] array.repeat(x, 3); // [ 1, 2, 1, 2, 1, 2 ]
There was an error while loading. Please reload this page.