js一维数组转二维

1,333 阅读1分钟

let a = ['a','b','c']; let b = ['1','2','3']; a.map((key, value) => [key, b[value]]; 结果: ["a", "3"], ["b", "4"],["c", "5"]