首页 > 技术文章 > js任意数组按下标相加
kkw105 2019-02-22 15:08 原文
let a=[1,2,3], b=[4,5,6]; let s = a.map(function(v, i) { return v + b[i]; }); console.log(s);