function a(...arr) {
let json = [...arr];
//保存结果的数组
let result = [];
for (let key of json) {
key.forEach((value, index) => {
if (isBlank(result[index])) {
result[index] = 0;
}
result[index] += value;
})
}
function isBlank(val) {
if (val == null || val == "") {
return true;
}
}
return result
}
// console.log(a([1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6]))