1
鑑於我們和對象的數組:具有相同的價值觀推對象數組
let objects = [
{name: 'bob'},
{name: 'foo'},
{name: 'bar'},
{name: 'foo'},
{name: 'foo'}
]
我怎樣才能改變這個數組這一個:
let objects = [
[
{name: 'bob'}
],
[
{name: 'foo'},
{name: 'foo'},
{name: 'foo'}
],
[
{name: 'bar'}
]
]
高階函數
方式比礦XD漂亮 – rjustin