Сообщение от рони
|
нужен массив обьектов
|
base.total = 0;
base.produkt = Array.from({length : 10}, _ => {
var num = randomValueBetween(100, 999)|0,
name = getElem(vegString),
price = randomValueBetween(1, 100).toFixed(2),
count = randomValueBetween(1, 100)|0;
base.total += price * count;
return {num, name, price, count}
});