function cleanPayment() {
var budget = sheet.getRange(1,6,1,1).getValue();
var cardsTotal = 0;
for (var i = 0; i < cards.length; i++) {
cardsTotal += Number(cards[i]);
var perCard = budget / cardsTotal;
var payments = [];
payments.push(cards[i] * perCard);
}
Logger.log(payments);
}
payments
应该包含一个数组,不是吗?但Logger.log(payments)
返回单个数字。是 smb 看错了吗?
先感谢您。