javascript convert elements of an array into array for themselves

前端 未结 3 1138
醉话见心
醉话见心 2021-01-25 21:11

How can I convert the elements of the array into another array?

let a = [2, 4, 0, 8, 9, 15]

and the result will be :

a = [[2],          


        
3条回答
提交回复
热议问题