如何把多个数组合成二级数组(数组中的数组)?

小程序 文章 2021-03-07 11:21 0 27 全屏看文

如何把多个数组合成二级数组(数组中的数组)?How to combine multiple arrays into secondary arrays (arrays in arrays)?

如何把多个数组合成二级数组(数组中的数组)?

a:["a","b","c"]

b:["b","c","d"]

合并成

m:[

a:["a","b","c"],

b:["b","c","d"]

]

a: ["a", "B", "C"] B: ["B", "C", "d"] merged into m: [A: ["a", "B", "C"], B: ["B", "C", "d"]]

回答:

昌💤:
m.push(a,b)
brave:

-EOF-