如何从数组中创建一对数组对象?
let arrofObj = [ {name:"test1"},
{name:"test2"},
{name:"test3"},
{name:"test4"},
{name:"test5"} ]
预期产出
let output = [[{name:"test1"},{name:"test2"}],
[{name:"test3"},{name:"test4"}],
[{name:"test5"}]]
我尝试过使用array.entries()方法,但我无法将它们配对