octo-deno/make/arrays.js
2017-04-22 22:02:38 +03:00

12 lines
232 B
JavaScript

make.arrays = {
filledArray: function (fn, limit) {
let array = [];
let size = limit || random.number(make.numbers.tinyNumber);
for (let i = 0; i < size; i++) {
array.push(fn());
}
return array;
}
};