@extra-array/repeat.min
v2.10.19
Published
Repeats an array given times.
Downloads
1,503
Readme
Repeats an array given times. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
This is part of package extra-array.
This is browserified, minified version of @extra-array/repeat. It is exported as global variable array_repeat. CDN: unpkg, jsDelivr.
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 ]