Open kartamyshev opened 4 years ago
function fill(quantity, value) {
let array = [];
for (let i = 0; i<quantity; i++) {
array[i] = value;
}
return array;
}
function fill(quantity, value) {
return Array.from({length: quantity}, () => {
return value;
})
}