【发布时间】:2019-01-14 18:41:29
【问题描述】:
基本上,我需要从另一个数组中的每个元素添加一个数组中的每个元素。所以如果这是两个数组:
array1 = [
"item1",
"item2",
"item3",
"item4"
];
array2 = [
"choice1",
"choice2",
"choice3",
"choice4"
];
我需要让array1变成这样:
"item1",
"choice1",
"item2",
"choice2",
"item3",
"choice3",
"item4",
"choice4"
];
有人知道怎么做吗?谢谢
【问题讨论】:
-
欢迎来到 StackOverflow!请记住在问题中包含您尝试过的内容。
-
欢迎来到 Stackoverflow,在发布问题之前阅读本指南以获得最佳帮助:stackoverflow.com/help/how-to-ask
标签: javascript arrays