1 回答
LEATH
TA贡献1936条经验 获得超6个赞
var a = [5, 6, 7, 8];
var b = [-1, 2, -3, -4];
function getResult(a, b) {
var c = [];
if (a.length === b.length) {
for(var i = 0; i < a.length; i++) {
c[i] = a[i] + b[i];
}
}
return c;
}
alert(getResult(a, b));
添加回答
举报
0/150
提交
取消