var arr = [
{
num : 33,
str: "one"
},
{
num : 34,
str: "two"
},
{
num : 36,
str: "three"
},
{
num : 37,
str: "一"
},
{
num : 42,
str: "二"
}
]
想得到
var newarr = [
["one","two"],
["three","一"],
["二"]
]
相邻的放在一个数组里面 33,34 36,37 42 求助js该怎么写
其实原理很简单,咱就比比谁代码量少吧。